How to install Mediawiki on Ubuntu 17.04
To install Mediawiki on Ubuntu 17.04
MediaWiki is a PHP wiki package designed for use on Wikipedia. It allows the user to create your own personal wiki site. It is an extremely powerful and a featured wiki implementation, which also shows the data stored in a database. It is widely used in many sites such as Wikipedia, Wikitionary, WikiHow, WikiLeaks, etc. MediaWiki can image image and multimedia files that are stored in the filesystem. This tutorial explains the installation procedure of Ubuntu 17.04.
Pre- Requisite
Lamp Stack
- Apache
- MariaDB
- PHP along with its modules (apt-get install php5-intl php5-gd)
If you want to install texlive and php5-xcache packages then run the following command.
apt-get install texlive php5-xcache
Installation procedure
To proceed with the installation procedure, download the mediawiki package using wget command followed by the download link.
root@linuxhelp:~# wget https://releases.wikimedia.org/mediawiki/1.29/mediawiki-1.29.1.tar.gz
--2017-10-28 12:42:24-- https://releases.wikimedia.org/mediawiki/1.29/mediawiki-1.29.1.tar.gz
Resolving releases.wikimedia.org (releases.wikimedia.org)... 91.198.174.217
Connecting to releases.wikimedia.org (releases.wikimedia.org)|91.198.174.217|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 39734499 (38M) [application/x-gzip]
Saving to: ‘ mediawiki-1.29.1.tar.gz’
mediawiki-1.29.1.tar.gz 100%[===========================================================================================> ] 37.89M 948KB/s in 45s
2017-10-28 12:43:12 (853 KB/s) - ‘ mediawiki-1.29.1.tar.gz’ saved [39734499/39734499]
Extract the downloaded package using tar command.
root@linuxhelp:~# tar -xvzf mediawiki-1.29.1.tar.gz
mediawiki-1.29.1/
mediawiki-1.29.1/.eslintrc.json
mediawiki-1.29.1/.data-stylelintrc
mediawiki-1.29.1/api.php
mediawiki-1.29.1/autoload.php
mediawiki-1.29.1/cache/
mediawiki-1.29.1/cache/.htaccess
mediawiki-1.29.1/composer.json
mediawiki-1.29.1/composer.local.json-sample
mediawiki-1.29.1/COPYING
mediawiki-1.29.1/CREDITS
mediawiki-1.29.1/docs/
mediawiki-1.29.1/docs/code-coverage/
mediawiki-1.29.1/docs/code-coverage/README
mediawiki-1.29.1/docs/contenthandler.txt
.
.
.
mediawiki-1.29.1/vendor/zordius/lightncandy/tests/example_partials.php
mediawiki-1.29.1/vendor/zordius/lightncandy/tests/handlebarsSpecTest.php
mediawiki-1.29.1/vendor/zordius/lightncandy/tests/helpers_for_test.php
mediawiki-1.29.1/vendor/zordius/lightncandy/tests/LCRun3Test.php
mediawiki-1.29.1/vendor/zordius/lightncandy/tests/LightnCandyTest.php
mediawiki-1.29.1/vendor/zordius/lightncandy/tests/mustacheSpecTest.php
mediawiki-1.29.1/vendor/zordius/lightncandy/tests/recursive.tmpl
mediawiki-1.29.1/vendor/zordius/lightncandy/tests/regressionTest.php
mediawiki-1.29.1/vendor/zordius/lightncandy/tests/test1.tmpl
mediawiki-1.29.1/vendor/zordius/lightncandy/tests/test2.tmpl
mediawiki-1.29.1/vendor/zordius/lightncandy/tests/test3.tmpl
mediawiki-1.29.1/vendor/zordius/lightncandy/UPGRADE.md
Rename the extracted folder and move it into the Apache document root by executing the following set of commands.
root@linuxhelp:~# mv mediawiki-1.29.1/ mediawiki
root@linuxhelp:~# mv mediawiki /var/www/html/
root@linuxhelp:~# cd /var/www/html/
root@linuxhelp:/var/www/html# ll
total 24
drwxr-xr-x 3 root root 4096 Oct 28 12:46 ./
drwxr-xr-x 3 root root 4096 Sep 8 12:40 ../
-rw-r--r-- 1 root root 10918 Sep 8 12:41 index.html
drwxr-xr-x 15 501 staff 4096 Aug 23 22:41 mediawiki/
Provide the appropriate owner permission and file execution permission by executing the following command.
root@linuxhelp:/var/www/html# chown -R www-data:www-data /var/www/html/
root@linuxhelp:/var/www/html# ll
total 24
drwxrwxr-x 3 www-data www-data 4096 Oct 28 12:46 ./
drwxr-xr-x 3 root root 4096 Sep 8 12:40 ../
-rwxrwxr-x 1 www-data www-data 10918 Sep 8 12:41 index.html*
drwxrwxr-x 15 www-data www-data 4096 Aug 23 22:41 mediawiki/
Restart your Apache service.
root@linuxhelp:/var/www/html# systemctl restart apache2
Switch over to browser and type the URL as http://yourdomain/mediawiki. Select the set up the wiki option.
Select the required language and click Continue option.
The installation page of MediaWiki is displayed on the screen. The environmental checks is shown to the user.
Now set the database and configure the database by entering the details as shown below.
The database is configured as follows and displayed on the screen. Select the storage engine and the database character set options.
Create a new project under a project namespace. Create a new user and password along with the email address.
This window shows the copyright and license agreement of MediaWiki. You can choose to show the license in the site.
$wgEnableParserCache = false;
$wgCachePages = false;
1)You use a different database for each wiki
2)You use a different database prefix for each wiki