How do I install MediaWiki?

  1. Complete the CGI Request Form for the account installing MediaWiki, if CGI is not already enabled.

  2. Once CGI is enabled, log into the account on eniac.seas.upenn.edu.

  3. Note: If you already have a wiki directory in your html directory, rename or delete it before installing MediaWiki.

  4. Run the following command to install MediaWiki (please wait patiently for the script to finish):

    install-mediawiki
  5. Continue the installation by visiting your wiki in a web browser.

    If you have CGI activated on fling, visit (where username is the SEAS account name where you are installing MediaWiki):

    https://fling.seas.upenn.edu/~username/wiki/

    If you have CGI activated on alliance, visit:

    https://alliance.seas.upenn.edu/~username/wiki/

  6. Enter the "Site Config" fields as you see fit.

  7. Under "Database Config" choose SQLite as your Database Type (skip the MySQL and Postgres sections).

    For best results, leave the name as-is (but if you change it, it must not have any spaces).

    In the "SQLite data directory" field put:

    /home1/<first inital>/<username>/html/wiki/data

    This example is for the username of victor:

    /home1/v/victor/html/wiki/data
  8. After submitting this information, follow any remaining instructions. At the end, the installer will provide a link to download the "LocalSettings.php" file to your local computer with instructions to "put it in the base of your wiki installation (the same directory as index.php)." You must copy this file to the appropriate location:

    /home1/<first initial>/<username>/html/wiki/LocalSettings.php
  9. Run the following command:

    chmod 700 ~/html/wiki/LocalSettings.php

Your wiki should now be installed. Note that you will need to create accounts for your users before they can edit pages.

File Uploads

If file uploads are enabled during installation, some configuration will be present in LocalSettings.php:

## To enable image uploads, make sure the 'images' directory
## is writable, then set this to true:
$wgEnableUploads = true;
$wgUseImageMagick = true;
$wgImageMagickConvertCommand = "/usr/bin/convert";

Without modification on SEAS servers, it will appear that file uploads work, but attempted access results in a 403 Forbidden error due to improper permissions on the directories created by Mediawiki. Add the following lines to LocalSettings.php to fix the problem:

# Set the correct permissions when creating directories (required for file uploads)
$wgDirectoryMode = 0755;
umask(0022);
© Computing and Educational Technology Services | Contact CETS
cets@seas.upenn.edu | 215.898.4707