Manual:Installing MediaWiki on Ubuntu via GUI and Synaptic

This page describes how to get MediaWiki up and running on Ubuntu Karmic (9.10) Desktop Edition using only the packages provided by Ubuntu.

As of December 2009, the latest version of MediaWiki in the Ubuntu repository is 1.15.

For running MediaWiki on Ubuntu Gutsy Server Edition see Manual:Running MediaWiki on Ubuntu.

Install packages

 * 1) Menu: System &rarr; Administration &rarr; Synaptic Package Manager
 * 2) Mark checkboxes next to:
 * 3) *mediawiki (will automatically include Apache & PHP)
 * 4) *mysql-admin
 * 5) Click 'Apply'
 * 6) Choose and enter the root password for MySQL when prompted

Set URL alias of MediaWiki and server name for Apache
This section assumes you want your wiki's URL to be  http://localhost/mediawiki . If this is not what you want, change "localhost" to your preferred server name and "mediawiki" to your preferred URL alias in the following instructions.

First we have to set the server name for your new Apache server.


 * 1) Run in Terminal:
 * gksudo gedit /etc/apache2/httpd.conf
 * 1) This file is empty by default. Add the following line:
 * ServerName localhost
 * 1) Save and close file.

(more here)

Next you have to set the URL alias of the MediaWiki installation.


 * 1) Menu: Applications &rarr; Accessories &rarr; Terminal
 * 2) Run the following command to open Apache configuration file:
 * gksudo gedit /etc/mediawiki/apache.conf
 * 1) Remove the '#' on the third line so that line reads:
 * Alias /mediawiki /var/lib/mediawiki

(You can replace /mediawiki with any alias you want, such as /mywiki)

Restart Apache service
Apache has to be restarted to read the changed configuration files.

Run in Terminal: sudo /etc/init.d/apache2 restart

Or from Gnome Desktop GUI:
 * 1) Menu: System &rarr; Administration &rarr; Services
 * 2) Uncheck and re-check the checkbox next to Web server (Apache2)

Configure your wiki

 * 1) Open web browser and navigate to:  http://localhost/mediawiki  (if you changed the server name or URL alias in previous section, change the URL accordingly)
 * 2) Click " set up the wiki " link.
 * 3) For "Wiki name", you can choose any name (but not "MediaWiki") unless this installation is for a pre-existing MediaWiki instance, in which case use the same 'Wiki name' as the previous installation.
 * 4) "Contact e-mail", "Language", "Copyright/license", "Admin username" can be left unchanged.
 * 5) You will have to enter a password for the wiki administrator (default username 'WikiSysop'), and enter it again to confirm.
 * 6) "Shared memory cacheing", "Memcached servers": leave unchanged.
 * 7) "E-mail features (global)" - set to "Disabled" unless you plan to use MediaWiki's e-mail features.
 * 8) "User-to-user e-mail", "E-mail notification about changes", "E-mail address authentication", "Database type", "Database host": leave unchanged.
 * 9) "Database name", "DB username": leave unchanged to allow MediaWiki to create a user for accessing the wiki database, unless you have already used MySQL Administrator to create a database and user for MediaWiki.
 * 10) "DB password", "DB password confirm": Enter password for the wiki database user twice. Warning: This password will be stored in plain text in LocalSettings.php!
 * 11) To let MediaWiki create the wiki database and database user, click the "Use superuser account" checkbox and enter the MySQL superuser name and password.
 * 12) Click 'Install MediaWiki!' button.

Move LocalSettings.php
Run in Terminal: sudo mv /var/lib/mediawiki/config/LocalSettings.php /etc/mediawiki/