How do I install MediaWiki?

  1. If CGI is not already enabled for the account that will host Mediawiki, please complete the CGI Request Form.

  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 public_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

    This script installs MediaWiki by creating symbolic links to a common codebase that is periodically updated by CETS. Remaining configuration and customization will be accomplished using files owned by the account.

  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. Click on the link in the Please set up the wiki first message and follow the prompts.

  7. In the Connect to database section, change these two settings only (replacing first initial and username with those of the account):

    • Database type: SQLite
    • SQLite data directory: /home1/<first inital>/<username>/public_html/wiki/data

    For an account named example, the data directory would be entered as:

    /home1/e/example/public_html/wiki/data
  8. Please set a strong password for the initial Administrator account in the Name section. At the bottom of that page, select Ask me more questions and click the Continue button.

  9. In the Options section, please set the User rights profile to Authorized editors only or Private wiki to protect your wiki from unauthorized edits.

  10. After submitting this information, follow any remaining instructions. At the end, the installer will automatically download or provide a link to download the LocalSettings.php file with instructions to "put it in the base of your wiki installation (the same directory as index.php)." You must transfer this file to the appropriate location:

    /home1/<first initial>/<username>/public_html/wiki/LocalSettings.php
  11. Then run the following command while logged into the account on eniac.seas.upenn.edu:

    chmod 700 ~/public_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.

How do I enable 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