Difference between revisions of "MediaWiki"
From Blue-IT.org Wiki
(→Initial install) |
(→Alter user groups in the database) |
||
Line 38: | Line 38: | ||
==Database related== | ==Database related== | ||
===Alter user groups in the database=== | ===Alter user groups in the database=== | ||
+ | See [http://meta.wikimedia.org/wiki/Help:User_rights User_rights] | ||
+ | |||
mysql -u root -p | mysql -u root -p | ||
mysql> use mediawiki | mysql> use mediawiki | ||
− | mysql>select * from user_groups; | + | mysql> select * from user_groups; |
+---------+------------+ | +---------+------------+ | ||
| ug_user | ug_group | | | ug_user | ug_group | | ||
Line 49: | Line 51: | ||
+---------+------------+ | +---------+------------+ | ||
3 rows in set (0.00 sec) | 3 rows in set (0.00 sec) | ||
+ | |||
+ | Delete a row | ||
mysql> DELETE from user_groups where ug_group='aGroup' and ug_user='####'; | mysql> DELETE from user_groups where ug_group='aGroup' and ug_user='####'; | ||
+ | |||
+ | Insert a new user / group | ||
mysql> INSERT INTO user_groups (ug_user, ug_group) VALUES ('####', 'aGroup'); | mysql> INSERT INTO user_groups (ug_user, ug_group) VALUES ('####', 'aGroup'); | ||
+ | |||
+ | ===Edit the Localsettings.php=== | ||
+ | |||
+ | ## PERMISSIONS | ||
+ | # This snippet prevents new registrations from anonymous users | ||
+ | # (Sysops can still create user accounts) | ||
+ | #$wgGroupPermissions['*']['createaccount'] = false; | ||
+ | |||
+ | ## USERS | ||
+ | ## see: http://meta.wikimedia.org/wiki/Help:User_rights | ||
+ | # This snippet prevents editing from anonymous users | ||
+ | $wgGroupPermissions['*']['edit'] = false; | ||
+ | |||
+ | # This will still allow logged in users to edit | ||
+ | $wgGroupPermissions['user']['edit'] = true; | ||
+ | |||
+ | # No Pin header for non-logged in users | ||
+ | $wgShowIPinHeader = false; | ||
+ | |||
+ | # This snippet prevents new registrations from anonymous users | ||
+ | # (Sysops can still create user accounts) | ||
+ | #$wgGroupPermissions['*']['createaccount'] = false; |
Revision as of 15:48, 9 June 2006
Contents
Initial installation
Concerns
- Media Wiki 1.6.6
- Mysql 4.0.15
- SuSE 9.0 on vserver
Patches
There are some major problems concerning the installation of media wiki on SuSE 9.0 on a vserver:
- Mysql is only version 4.0.15
- PHP is per default limited in memory
You will get an error during installation.
Because of a bug in php you shoul do 2 things:
First edit /etc/php.ini an change the memory limit from 8 to 50MB:
memory_limit = 50M ; Maximum amount of memory a script may consume (8MB)
Second due to a bug in older mysql versions you have to change two installation files of the media wiki.
At the end of the file
maintenance/mysql5/tables.sql
Change
KEY (job_cmd, job_namespace, job_title) ) TYPE=InnoDB, DEFAULT CHARSET=utf8;
to
KEY (job_cmd(255), job_namespace, job_title(255)) ) TYPE=InnoDB, DEFAULT CHARSET=utf8;
(!) The same (!) you have to do in file
maintenance/archives/patch-job.sql
Alter user groups in the database
See User_rights
mysql -u root -p mysql> use mediawiki mysql> select * from user_groups; +---------+------------+ | ug_user | ug_group | +---------+------------+ | 1 | bureaucrat | | 1 | sysop | | 2 | sysop | +---------+------------+ 3 rows in set (0.00 sec)
Delete a row
mysql> DELETE from user_groups where ug_group='aGroup' and ug_user='####';
Insert a new user / group
mysql> INSERT INTO user_groups (ug_user, ug_group) VALUES ('####', 'aGroup');
Edit the Localsettings.php
## PERMISSIONS # This snippet prevents new registrations from anonymous users # (Sysops can still create user accounts) #$wgGroupPermissions['*']['createaccount'] = false;
## USERS ## see: http://meta.wikimedia.org/wiki/Help:User_rights # This snippet prevents editing from anonymous users $wgGroupPermissions['*']['edit'] = false;
# This will still allow logged in users to edit $wgGroupPermissions['user']['edit'] = true;
# No Pin header for non-logged in users $wgShowIPinHeader = false;
# This snippet prevents new registrations from anonymous users # (Sysops can still create user accounts) #$wgGroupPermissions['*']['createaccount'] = false;