ELS Howto: MediaWiki


Synopsis

This document describes how to configure a wiki on Elemental Linux Server (ELS) using MediaWiki wiki software with a SQLite3 database.


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 imagemagick package from the 'Additional Applications' CD-ROM.


Installation

Installation instructions for MediaWiki are available on the MediaWiki web site. This document will guide you through the specifics of installing it with the SQLite3 database tools bundled with ELS.

  1. Download the latest version of MediaWiki from http://www.mediawiki.org and extract it into your web server's document root directory.
  2. Create a symbolic link with the name of your wiki that points to the mediawiki directory.
  3. Create a directory for the SQLite database that is outside of the web server's document root.
  4. Change the ownership of the database directory to the same user that httpd runs as.

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 /home/httpd
wget http://download.wikimedia.org/mediawiki/1.19/mediawiki-1.19.2.tar.gz
tar --no-same-owner -zxf mediawiki-1.19.2.tar.gz

ln -s mediawiki-1.19.2 wiki

mkdir /home/sqlite

chown daemon /home/sqlite

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 on the link to 'set up the wiki'.
  2. Verify that the environment check did not find any errors.
  3. On the database connection page, select SQLite as the database type and enter the path to where the sqlite database will reside.
  4. Finish the installation using the MediaWiki documentation.

Example

The following example show the settings for a database called 'mediawiki' that is stored in the /home/sqlite directory.

SQLite data directory:
  /home/sqlite
Database name:
  mediawiki

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. Check that PHP is installed properly. There is a good test script at http://www.htmlite.com/php003.php
  2. Run netstat -tlnp | grep httpd to verify that httpd is listening on port 80.
  3. Verify that firewall rules allow unrestricted access for on port 80 for any hosts trying to access your wiki.
  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.