HOWTO: Setup a MediaWiki server on Debian Linux Lenny
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:
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!”
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:
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.
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
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
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.
You can learn here how to create/edit pages and do other fun stuff.
Happy MediaWik’ing!









Email Subscription









March 8th, 2009 at 7:38 am
[...] which you can choose one. I will explain specifically how to setup a MediaWiki server. Read more here MediaWiki is exactly the same Wiki engine that is use to power the famous Wikipedia site on the [...]
March 19th, 2009 at 3:03 pm
[...] Some time back I wrote an article on how to setup mediawiki on your Debian Linux system. Now suppose you are the administrator of [...]
March 20th, 2009 at 2:06 pm
[...] using a shell script. Another example would be that suppose you install a web application like mediawiki or mantis on your machine and both of them have features like sending emails to the users upon [...]
May 10th, 2009 at 11:25 am
hey guys .. i am doing a project need some help here.
need to configure a media wiki is my first assignment ..
do u really need the superaccount(MYSQL Password) pass word .. to configure it. is there anyother way to configure a mediawikik.. your info will help me a lot.
Reply to this comment
Admin Reply:
May 13th, 2009 at 9:41 am
I don’t think you can configure it without the MYSQL root password. If you wan’t more details see this link:
http://www.mediawiki.org/wiki/Manual:Installation/Creating_system_accounts
Reply to this comment
June 1st, 2009 at 7:13 pm
[...] For this tutorial I am going to assume that you are running a Debian 5.0 (Lenny) machine. In general any Linux distribution (Ubuntu, Fedora, Mint, etc.) should work just fine. Make sure that Apache server is configured and works fine. If you are not sure how to do that then please refer to the Step 3 of this post. [...]
June 20th, 2009 at 11:02 am
Hi — Thanks for the helpful tutorial! When I get to the stage where it’s supposed to be ready to go, and I go to the url for my wiki, my browser says “You have chosen to open [blank] which is a : PHTML file”. I’m thinking that this is because “apt-get install mediawiki” installed the apache2 version of php, but I’m running apache1.3. -Ben
Reply to this comment
October 2nd, 2009 at 5:20 pm
[...] have installed mediawiki on your Debian Lenny system. If you have not done it yet, then see this post on how to do [...]
October 31st, 2009 at 5:30 pm
[...] see the name of your MediaWiki MySQL database that you had created while installing MediaWiki. Let’s say the database name is [...]
September 6th, 2010 at 7:06 pm
[...] Sometime back I had blogged about how to install and configure mediawiki on your Debian System. Today we will learn how to use the LDAP/Active Directory authentication [...]
October 6th, 2010 at 2:00 pm
[...] Debian Lenny system which runs an Apache2 web server and a lot of other web-based application like MediaWiki, Mantis, etc. There are a lot of different programs that will let you view your web server [...]
May 6th, 2011 at 9:28 am
If I click on “Please set up the wiki first” i got an error:
Warning: require_once() [function.require-once]: SAFE MODE Restriction in effect. The script whose uid/gid is 33/33 is not allowed to access /var/lib/mediawiki/install-utils.inc owned by uid/gid 0/0 in /var/lib/mediawiki/config/index.php on line 40
Warning: require_once(/var/lib/mediawiki/install-utils.inc) [function.require-once]: failed to open stream: Resource temporarily unavailable in /var/lib/mediawiki/config/index.php on line 40
Fatal error: require_once() [function.require]: Failed opening required ‘/var/lib/mediawiki/install-utils.inc’ (include_path=’.:/usr/share/php:/usr/share/pear’) in /var/lib/mediawiki/config/index.php on line 40
any hints?
Its a Debian on a virtual host (Debian, Lenny)
Reply to this comment
May 6th, 2011 at 9:48 am
Got it! I turned safe mode off
http://www.mediawiki.org/wiki/Safe_mode
Reply to this comment