Installing MediaWiki on Debian Sarge

From Meta, a Wikimedia project coordination wiki
Jump to: navigation, search
MediaWiki Handbook: Contents, Readers, Editors, Moderators, System admins, Researchers +/-

This tutorial is for using the mediawiki packages in Etch on Sarge, using Apache. See Running MediaWiki on Debian GNU/Linux] for information on using the latest version of mediawiki.

MySQL installation[edit]

Install the MySQL version you prefer. For example, to install MySQL 4.0 using apt-get:

# apt-get install mysql-server

PHP installation[edit]

Install PHP and the MySQL module for PHP by installing the packages php4 and php4-mysql. For example, using apt-get:

# apt-get install php4 php4-mysql

Optionally, install php4-gd and php4-imagick.

Apache Installation[edit]

Install the Apache version you prefer and the PHP module for that Apache version. For example, to install Apache 2 and the PHP module for it using apt-get:

# apt-get install apache2 libapache2-mod-php4

Configure MySQL[edit]

Most of all you need to apply mysql root password.

mysqladmin -u root password 'default admin password'

Configure PHP[edit]

# editor /etc/php4/apache2/php.ini

Set the memory limit to 20M (at least, default is 8M):

memory_limit = 20M


Make sure the following lines are uncommented:

extension=mysql.so
extension=gd.so

MediaWiki Installation[edit]

As mediawiki is not in sarge, you need to get it from etch or unstable. One way is to set up a Sarge/Etch mix. If the way to do this is not obvious, beware. One way could be to temporarily add Etch sources. To do so, add an appropriate line to sources.list, then update your APT index. For example, using apt-get:

# apt-get update

Then install the mediawiki package. For example, using apt-get:

# apt-get install mediawiki

The MediaWiki installation should now be done. Remember: if you are not familiar with APT and temporarily added Etch sources above, now is the time to remove them. Remove the sources.list line you added, then update your APT index again.

MediaWiki configuration[edit]

Configuration is done at http://localhost/mediawiki/config (substitute localhost with your hostname). During the configuration it will do some preliminary checks to see that it can run MediaWiki and the required applications are installed. After that it will need to setup some settings about your system, such as :

* Name of your wiki
* Name and password for the SysOp (main administrator for the wiki)
* MySQL settings, the name of the database, user to access it and the root password (to be able to create the tables and such)


After configuration, you need to remove the config folder from your installation (or make a copy of it somewhere else). Failure to do this will make your system configurable by anyone.