Galactic Civilizations 3
MediaWiki on Debian

MediaWiki on Debian

Category: Administration.
Posted by on the 21/08/2013.
Last update on the 27/08/2013.

Description

This tutorial explains how to install and configure MediaWiki in order to provide a Wiki to your users.

Introduction

This tutorial is intended for people under Debian or distributions based on it (Ubuntu, Xandros ...). All commands in this tutorial are executed as root. (su command).

In order to follow this tutorial you need to have a fully working installation of Apache2, Mysql and PHP 5.
If you have not these prerequisites, a tutorial that explains the complete install of a web server is available.

If you are using Ubuntu, you need to activate universe repository.

Installation of MediaWiki

To install our Wiki, we need to install the package mediawiki. To do that, execute the following command:

apt-get install mediawiki

We can also install the package mediawiki-extensions. This package provides all the available extensions for MediaWiki. To do that, execute the following command:

apt-get install mediawiki-extensions

If we need to use mathematical formulas, we can also install the package mediawiki-math. To do that, execute the following command:

apt-get install mediawiki-math

Configuration

Apache2 configuration

MediaWiki has a configuration file. Therefore we just need to create a link to this file in order that Apache2 uses it. To do that, execute the following commands:

ln -s /etc/mediawiki/apache.conf /etc/apache2/sites-available/mediawiki.conf
ln -s /etc/apache2/sites-available/mediawiki.conf /etc/apache2/sites-enabled/001-mediawiki

Then, we create a symbolic link in order to have the MediaWiki folder inside the www folder. To do that, execute the following command:

sudo ln -s /var/lib/mediawiki/ /var/www/mediawiki

Now that we have finished configuring the web server, we can restart it. To do that, execute the following command:

/etc/init.d/apache2 restart

MediaWiki configuration

To configure MediaWiki, we need to open a web browser and type the address http://localhost/mediawiki or 127.0.0.1/mediawiki.

Then we need to click on « set up the wiki » and follow the instructions that are displayed on the screen.

Mediawiki: clikc on set up the wiki

When the configuration is finished, we can copy it inside the MediaWiki folder. To do that, execute the following command:

cp /var/lib/mediawiki/config/LocalSettings.php /etc/mediawiki/LocalSettings.php

We will now attribute rights for the security of our wiki. To do that, execute the following command:

chown www-data:www-data /etc/mediawiki/LocalSettings.php
chmod 640 /etc/mediawiki/LocalSettings.php

mediawiki: configuration and rights

Test

You can test your wiki by opening a web browser and by typing the address http://localhost/mediawiki or 127.0.0.1/mediawiki.

mediawiki homepage

You like this tutorial ?
Like this website in order to promote it on facebook !

You like this tutorial ? Share it with your friends !
Partager sur Facebook Partager sur Twitter Partager sur Myspace Partager sur Stumbleupon Soumettre sur Reddit Partager sur Digg Ajouter à vos favoris Technorati Ajouter à vos favoris Live Ajouter à vos favoris Google Ajouter sur vos favoris Yahoo