Add the Wiki


This short guide will assume that we want to install a Wiki for the Tech Club application so that our Members can write their own guides. We will use the standard tool, Mediawiki, but with PostgreSQL as the database, and not the default MySQL. The info here is based on the installation guide, but with my additional points.


Download and unpack Mediawiki into the www directory

  1. Check the latest download link from the download page. At the time of writing it is wget
  2. Move the file into the www directory: mv mediawiki-*.tar.gz ~/path/to/techclub3/frontend/www
  3. Go to that directory: cd ~/path/to/techclub3/frontend/www
  4. Unpack the tar: tar xvzf mediawiki-*.tar.gz
  5. Rename "wiki" directory to "w", so the URL will be shorter: mv wiki w

Create and prepare the dedicated Postgres user and database.

  1. In KeePass, create a new password for the Postgres Wiki user
  2. In PgAdmin, logged in as the postgres user, open a new query window, and run the following, one at a time:
    CREATE DATABASE wikidb WITH OWNER wikiuser;
  4. Now open a new query window from within the new database "wikidb" and run the following:
  5. GRANT SELECT ON pg_ts_config TO wikiuser;
    GRANT SELECT ON pg_ts_config_map TO wikiuser;
    GRANT SELECT ON pg_ts_dict TO wikiuser;
    GRANT SELECT ON pg_ts_parser TO wikiuser;

Run the Mediawiki installation script. This will create the database tables and assign the correct internal settings.

  1. In your browser, go to http://techclub.macinntech.local/w/index.php and follow the on-screen instructions
  2. The default database is MySQL, so remember to choose PostgreSQL with the following params: dbname: wikidb, schema: public, user: wikiuser, pw: <new pw>
  3. When you are finished, download the LocalSettings.php file and move it to the /w/ root directory. This is where configuration changes will be made in future
  4. You may want to restrict the permissions on the LocalSettings.php file as described here

Add the link to the techclub3 nav bar.

  1. In techclub3, we have an entry in the navbar for the Wiki, but we left the link empty. Open includes/ and change the link to "/w/index.php"
  2. Now when you click on the link in the nav bar, it should open a new tab and you should see the Wiki Main Page, shown below.

comments powered by Disqus