ICS Support for New Academic Staff - Wiki

Technical Information

Setting up this Wiki is relatively straightforward. You will need the following:

Install MediaWiki on an appropriate server (installation instructions are contained in the MediaWiki manual), and configure it so your staff have access.

Installation

The following is a distillation of the steps needed to install on a Linux (or other *nix) system. These steps will need to be adjusted for other operating systems.

  1. Download the latest MediaWiki tarball and extract to a local directory and rename the directory to something friendly (say, wiki).
  2. Upload the wiki directory to your web server. Note that MediaWiki's installation instructions are in the INSTALL file in the distribution.
  3. Ensure that the directory and its contents are all world-readable:
    cd wiki
    chmod -R a+rX .
  4. Make the subdirectory config world-writable:
    chmod a+w config
    (This is temporary whilst you run the installation script).
  5. Create a database on your database server for your Wiki to use, and create a user (say, wikiuser) with full permissions on that database.
  6. In a web browser, navigate to the wiki directory (URL http://servername.any.ac.uk/wiki) and click the link to run the install script.
  7. Fill out the form with the requisite information. Under database config enter the name of the database you set up, the location of your database server and the user details of the database user you created.
  8. Click install to install the Wiki.
  9. On the web server, copy LocalSettings.php from the wiki/config subdirectory to the wiki directory:
    cp config/LocalSettings.php ./LocalSettings.php
  10. Remove the world-writable permissions from the config subdirectory:
    chmod a-w config
  11. In the browser, follow the link to the Wiki main page. At this stage, note that the default front page has links to explanations of configuration settings (LocalSettings.php), an FAQ and other documentation.

Importing Content

Now that you have a copy of MediaWiki up and running, you can install the resource.

  1. Delete the main page:
    php maintenance/nukePage.php Main_Page
  2. Save the file snas-wiki.xml (say, /tmp/snas-wiki.xml) which contains the Wiki content.
  3. Import the content:
    php maintenance/importDump.php /tmp/snas-wiki.xml
  4. Add the license information by editing LocalSettings.php:
    Uncomment the line $wgEnableCreativeCommonsRdf = true;
    Amend the following lines to read
    $wgSitename="SNAS";
    $wgRightsPage="";
    $wgRightsUrl="http://creativecommons.org/licenses/by-nc-sa/3.0/";
    $wgRightsText="Attribution-Noncommercial-Share Alike 3.0 ";
    $wgRightsIcon="http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png";
  5. (Optional) Add your own logo (say, /images/anyunilogo.jpg), in LocalSettings.php add the line
    $wgLogo="/images/anyunilogo.jpg"
    Note that the image should be 135x135px to display well.

Security

MediaWiki runs in user space, and security should not be a problem, provided your web server is correctly configured (but see the notes on the MediaWiki download regarding security). It is probably also wise to restrict access to users on your institution network in the first instance — attempted spamming is occasionally encountered.

You do have to decide whether you give access to all your staff, or to only a restricted set of users. We suggest that you do not allow anonymous users, and that you enable email authentication.

At present Shibboleth single sign-on is only available as an extension to MediaWiki, and we cannot comment on how robust it currently is.

Configuration

MediaWiki is fully configurable, and you should consult the documentation to tailor it to your own requirements. One particular extension you may wish to enable is the ability to provide an RSS Feed for changes to the site, which can assist in the timely dissemination of changes to the content of the Wiki.

Backups

You will want to backup your data regularly. This can be done in two ways.

Option 1

All the pages (excluding images) are kept in the database. Backup the database (e.g. using mysqldump and take a copy of the images subdirectory located where you installed MediaWiki.

This stores all the user configurations as well as the content.

Option 2

There is a subdirectory maintenance containing useful scripts, including php code for handling backups. To take a backup and store in /tmp/backup.xml,

php maintenance/dumpBackup.php --full > /tmp/backup.xml

To restore that backup,

php maintenance/importDump.php /tmp/backup.xml

This does not store user configurations, but is more portable, for example if you are upgrading to a newer version of MediaWiki.