How to Install Mediawiki
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
Step 1 – Update your local Repositories
apt update -y
Step 2 – Install Pre-Reqs
Install MediaWiki Application Pre-Requisites
sudo apt-get install Apache2 PHP texlive php-mbstring php-xml php-apcu php-horde-cache -y
Step 3 – Download MediaWiki and Unzip
Next download the MediaWiki zipped application and move to /var/www
wget https://releases.wikimedia.org/mediawiki/1.30/mediawiki-1.30.0.tar.gz
sudo gunzip mediawiki-1.30.0.tar.gz sudo tar -xvf mediawiki-1.30.0.tar.gz sudo mv mediawiki-1.30.0/* /var/www/html/wiki/
Step 4 – Install and Configure MariaDB
Install MariaDB
sudo apt-get install mariadb-client mariadb-server
Log into the MariaDB database, create a Database and grant privileges
sudo mysql -u root
Create database ps_wiki;
GRANT INDEX, CREATE, SELECT, INSERT, UPDATE, DELETE, ALTER, LOCK TABLES ON ps_wiki.* TO ‘wiki’ @ ‘localhost’ IDENTIFIED by ‘password’; FLUSH PRIVILEGES; Exit;
This will grant the permissions needed and create DB username called WIKI and Password password. Remember this as you will need it later.
Step 5 – Restart Apache to apply all configuration
sudo service apache2 restart
Step 6 – Navigate to the 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
Step 7 – 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
Step 8 – Database settings
Leave at default
Storage Engine = InnoDB
Database character set = Binary
Step 9 – 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
Step 10 – 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
Step 11 – Install
Click the install button and wait for media wiki to install.
This can take over 5 minutes dependant on hardware.
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
Recent Comments