How to Install Mediawiki

Reading Time: 2 minutes

MediaWiki is an open-source Wiki web application that 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 to Install MediaWiki on Ubuntu Version 17.10

Install MediaWiki Application Pre-Requisites

sudo apt-get install PHP texlive php-mbstring php-xml php-apcu php-horde-cache -y

Next download the MediaWiki

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 the 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, MICROSOFT WORD CAN ADD 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

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *