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
- Check the latest download link from the download page. At the time of writing it is
- Move the file into the www directory:
mv mediawiki-*.tar.gz ~/path/to/techclub3/frontend/www
- Go to that directory:
- Unpack the tar:
tar xvzf mediawiki-*.tar.gz
- Rename "wiki" directory to "w", so the URL will be shorter:
mv wiki w
Create and prepare the dedicated Postgres user and database.
- In KeePass, create a new password for the Postgres Wiki user
- In PgAdmin, logged in as the postgres user, open a new query window, and run the following, one at a time:
CREATE USER wikiuser WITH NOCREATEDB NOCREATEROLE NOSUPERUSER ENCRYPTED PASSWORD '<new pw>';
CREATE DATABASE wikidb WITH OWNER wikiuser;
- Now open a new query window from within the new database "wikidb" and run the following:
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.
- In your browser, go to http://techclub.macinntech.local/w/index.php and follow the on-screen instructions
- The default database is MySQL, so remember to choose PostgreSQL with the following params: dbname: wikidb, schema: public, user: wikiuser, pw: <new pw>
- 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
- You may want to restrict the permissions on the LocalSettings.php file as described here
Add the link to the techclub3 nav bar.
- In techclub3, we have an entry in the navbar for the Wiki, but we left the link empty. Open includes/ui_head.inc and change the link to "/w/index.php"
- 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.