MediaWIKI is an opensource Wiki web application which is used by Wikipedia. It is written in PHP, and requires a Database backend to function. It has been publicly released on the Open Source community.

Details are on https://www.mediawiki.org/wiki/MediaWiki

Instructions for Ubuntu Version 17.10

Install pre-requisites

  1. Installation of Ubuntu Server required
  2. Internet access from server

Application Pre-Requisites

sudo apt-get install php  

This will install php version 7.1 and all php pre-requisites (apache etc)

sudo apt-get install texlive 

This will install python and code packages

sudo apt-get install php-mbstring 

This will install php-mbstring

** Not always needed depends on Ubuntu build

sudo apt-get install php-xml

This will install php-xml

** Not always needed depends on Ubuntu build

sudo apt-get install php-apcu

This will install php-apcu

** Not always needed depends on Ubuntu build

sudo apt-get install php-horde-cache

This will install php-horde-cache

wget https://releases.wikimedia.org/mediawiki/1.30/mediawiki-1.30.0.tar.gz

This will download MediaWIKI application

sudo gunzip mediawiki-1.30.0.tar.gz

This unzips the GZ file

sudo tar -xvf mediawiki-1.30.0.tar.gz

This un-tar’s the TAR file

sudo mv mediawiki-1.30.0/* /var/www/html/wiki/

This moves MediaWIKI to the Apache website filesystem

sudo apt-get install mariadb-client mariadb-server

Installs MariaDB

Database Pre-Requisites

sudo mysql -u root

This will log you into MariaDB database. As this is a default installation there will be no password. Enter sudo MySQL -u root -p your-root-password if you have a root password already configured

Create database ps_wiki

Creates DB

GRANT INDEX, CREATE, SELECT, INSERT, UPDATE, DELETE, ALTER, LOCK TABLES ON ps_wiki.* TO ‘wiki’ @ ‘localhost’ IDENTIFIED by ‘password’

TYPE THIS OUT MANUALLY , WORD ADDS SYNTAX IF YOU COPY ANY PASTE

This will grant the permissions needed and create DB username called WIKI and Password password. Remember this as you will need it later.

FLUSH PRIVILEGES

Does was it says

Exit

Exits the DB application

 

Restart Apache to apply all configuration

sudo service apache2 restart

Restarts the apache web agent

 Web interface installation

Launch the wiki in your favourite web browser.  This will usually be the server IP followed by index.php

For Example,  http://192.168.1.157/index.php/

Click “Setup your first wiki”

Look for any warning messages

Setup Database in Web Interface

You will need the username and password created earlier

Under MySQL Settings

Database host = localhost

Database name = my_wiki

Database table prefix = LEAVE BLANK

Database Username: wiki

Database Password: password

Database settings

Leave at default

Storage Engine = InnoDB

Database character set = Binary

Wiki Name

Enter details as you require:

Name of Wiki: YOUR WIKI NAME

Project namespace: Leave set as “Same as the wiki name”

Your Username – ENTER NEW WIKI ADMINISTRATOR ACCOUNT

Password – ENTER NEW PASSWORD

Email – ENTER EMAIL ADDRESS

Options

User Rights – chose what type of wiki you want. I recommend either:

Open wiki means ANYONE can write to it

Account Creation required means your users must log in

Leave all other settings as default

Install

Click the install button and wait for media wiki to install.

This can take over 5 minutes dependant on hardware.

Complete

Once the installations are completed you will be prompted to download the localsettings.php  the installer has just created. Download, and then FTP these files to the UBUNTU server. Must be copied to /var/www/html/.

FTP programs like WINSCP.

 

Here is a video of the entire process