Purpose: In this post we will learn how to setup a mediawiki Wiki server on Debian Lenny. There are lots of Wiki choices available from which you can choose one. I will explain specifically how to setup a MediaWiki server. MediaWiki is exactly the same Wiki engine that is use to power the famous Wikipedia site on the Internet. You will get the exact same look-and-feel upon installing MediaWiki.

Step 1: Choose a Wiki application

#apt-cache search wiki

Step 2: Installed your selected Wiki application

#apt-get install mediawiki

Depending upon your existing installation, this will install around 174MB of additional packages. This process may take a while. Effectively it will turn your existing Debian machine into a LAMP Debian machine.

L = Linux

A = Apache

M = MySQL

P = PHP

You need AMP at least to run a wiki server.

Step 2 (a): Note down your MySQL-Server Administrative “root” user password

During the installation you will be asked to enter a password for your MySQL server:

MySQL Server

MySQL Server

Step 3: Verify if Apache works

Let’s verify if our Apache servers works or not. For those of you who don’t know, Apache is web server application and to verify we need to launch an Internet browser (like Iceweasel, Mozilla, Firefox, Opera, etc) and type in the following in the URL address bar:

http://localhost/

or IP address of your computer

http://192.168.0.1/

and you should see something like with the text “It works!”

Apache Configuration

Apache Configuration

This confirms that your Apache installation is successful.

Step 4: Setup MediaWiki

This step is very important. I searched a lot when I did this install myself but I was not able to find it anywhere.

ln -s /usr/share/mediawiki/ /var/www/mediawiki

Basically with above step we are

Step 5: Verify MediaWiki setup

Now type the following in your URL address bar in your browswer:

http://localhost/mediawiki/

and you should be able to see something like this:

MediaWiki Setup

MediaWiki Setup

The above screen confirms that your MediaWiki is installed properly.

Step 6: Configure MediaWiki

The next step would be to configure MediaWiki installation. Follow the images shown below.

Step 6(a): Click on “set up the wiki” link as shown in the above image and enter values in the field.

Configuring MediaWiki

Configuring MediaWiki - Site config

You can pretty much enter any values you like in the above fields. Make sure you write down these values somewhere just in case if you forget or don’t know where they are stored.

Step 6(b): Scroll down further and fill in Database values

Configuring MediaWiki - Database config

Configuring MediaWiki - Database config

Note: It is important that you “check” the box which says “Use superuser account” otherwise your installation will most likely fail. There are methods by which you can avoid checking the box but the steps involved will be more and you will have to get your hands dirty with MySQL server. Also in the “Superuser password” enter the password from Step 2(a), which you had used during installation of MySQL server.

You can leave the rest of the fields to their default value and scroll down all the way to the bottom of the page where it says “Install MediaWiki”.

Step 6(c): Click Install MediaWiki button

Successful MediaWiki Installation

Successful MediaWiki Installation

If you get a screen like above, then your MediaWiki installation and configuration is successful and you are almost ready to roll.

Step 7: Copy the configuration file

You can further configure and customize your MediaWiki by configuring the variables in the file LocalSettings.php. But before that we need to move the file to “/etc/mediawiki” directory as mentioned in the screen above.

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

Step 8: Access your MediaWiki

That’s it! You can start accessing your MediaWiki by typing the following:

http://localhost/mediawiki/

And you will see your Wiki Home page.

MediaWiki Complete

MediaWiki Complete

You can learn here how to create/edit pages and do other fun stuff.

Happy MediaWik’ing!

Be Sociable, Share!