ELS Howto: MediaWiki


Synopsis

This document describes how to install MediaWiki, the same software that powers Wikipedia, on your Elemental Linux Server (ELS) system.


Prerequisites

These instructions assume that you have a working PHP-enabled web server and a working email system. If you do not, see the ELS Howto: Apache and PHP and the ELS Howto: Remote Mail before beginning this document.

You may also want to install the following packages for additional functionality:


Installation

MediaWiki has been around a while and is well documented, however support of the SQLite database backend is a relatively new feature. Therefore, these instructions concentrate on the database portion of the setup.

Here are the important points to remember when installing MediaWiki with the SQLite backend.

Based on the information above, here are the instructions for installing MediaWiki on an ELS system:

  1. Fetch the latest 1.3.x version of MediaWiki from http://www.mediawiki.org/.
  2. Extract the MediaWiki archive into your web server's document root directory.
  3. Create a symbolic link with the name of your wiki that points to the MediaWiki directory.
  4. Change ownership of the MediaWiki config directory to the same user that httpd runs as.
  5. Create a directory for the SQLite database that is outside of the web server's document root.
  6. Change the ownership of the database directory to the same user that httpd runs as.
  7. Create a symbolic link called data that points to your SQLite database directory. This symlink should reside in the parent directory of your webserver's document root.

Example

The following example shows how you would install MediaWiki if your web server document root were /home/httpd and your SQLite databases were stored in /home/SQLite.

cd ~
wget http://download.mediawiki.org/mediawiki/1.13/mediawiki-1.13.4.tar.gz

cd /home/httpd
tar -zxf ~/mediawiki-1.13.4.tar.gz

ln -s mediawiki-1.13.4 WikiName

chown -R daemon mediawiki-1.13.4/config

mkdir /home/SQLite

chown daemon /home/SQLite

ln -s /home/SQLite /home/data

Note

WikiName should be replaced with whatever you want to call your wiki, provided the resulting URL is valid.


Configuration

Configuration of MediaWiki is done through a web browser interface and is most easily performed from a client workstation with a graphical browser.

  1. Point your web browser to the base URL of your wiki and click "set up the wiki".
  2. Verify that there are no errors detected and begin filling in values on the site configuration form, customizing as needed.
  3. Check that SQLite is selected as the database type.
  4. Leave the database name set to the default value or change it to match the name of your wiki.
  5. None of the other database settings apply to SQLite, but the installer will not continue without a DB username and DB password.
  6. After entering a DB username and DB password, click on the "Install MediaWiki!" button
  7. Follow any remaining instructions given by the MediaWiki installer.

Example

The following example shows the Database Settings fields of the installer for a wiki located in /home/httpd/wiki and a database stored in /home/SQLite:

Database type:        SQLite
Database host:        Value does not matter
Database name:        WikiName 
DB user:              Value does not matter, but must not be blank
DB password:          Value does not matter, but must not be blank
DB password confirm:  Value does not matter, but must not be blank

Note

After completing the installation, you should consider customizing some of the values in LocalSettings.php. Specifically, you'll want to do the following:


Testing

Testing of the configuration is done as you follow the web-based install procedure and possible remedies to common errors are displayed in the browser. However, there are a few things that can be checked if you cannot access the MediaWiki configuration page.

  1. Run netstat -tl to verify that httpd is listening on port 80.
  2. Check that PHP is installed properly. There is a good test script at http://www.htmlite.com/php003.php
  3. Verify that firewall rules allow unrestricted access for on port 80 for any hosts trying to access phpBB.
  4. Test network connectivity to the server by pinging it from another machine.

For additional help with installation and configuration, please refer to the MediaWiki home page.