Sunday, 14 September 2008

Installing MediaWiki - The easy and oversimplified approach

This article is an attempt to provide a bare bones and sure to work approach to install MediaWiki and get it running and ready to use in a very very short time. This was the method that I found to be the best given that I was trying to set this up in under 2 hours.

So, here we go.

1. We will be using a Linux platform to get this job done.
2. If you have a Linux installation that you can use - perfect - I did this on Debian Etch, so I would suggest that.
3. If you do not have a Linux installation or Debian or any Debian derivatives, then you can do what I did.
4. Download VMPlayer from VMWare - this is a free virtual machine player. You can find it here
[1]
5. Once you install this, please go ahead and get the Debian Etch 4.1 Virtual appliance from
[2]
6. This is an 800MB plus download and will be the slowest part of our job - I downloaded this in 30 minutes on my broadband here in London
7. Unzip this to a disk with some 4GB space. Open VMPlayer, browse to this folder and open the virtual machine file. If it gives a lock warning select take lock and if it asks did you move or copy this machine, say you moved it.
8. Debian should boot in a VMPlayer window and you will see a login prompt. Login as "user" with password "user". You are root.
9. Select the desktop menu in the control panel at the top and select Administration->Synaptic Package Manager
10. In click on search on the Synaptic window and search for MediaWiki
11. Select MediaWiki 1.7 in the list shown. Click on the checkbox and say mark for installation. It will prompt you to tell that more dependencies are needed - click OK to install them also.
12. Now search for MySQL and select MySQL client and MySQL server and mark them for installation.
13. Click on apply on the Synaptic window
14. Let it install the stuff.
15. Once done, bring up a browser and go to
http://localhost/mediawiki or the equivalent.
16. You should see a page saying Setup MediaWiki and a hyperlink to the set up.
17. Now fire up a terminal on the Debian box
18. type mysql and hit enter
19. You will be taken to the MySQL prompt.
20. Type this to create a DB called wikidb - "create database wikidb;"
21. Type this to create a user and give him necessary grants - "grant all on wikidb.* to wikiuser identified by wikiuser"
22. Type this to let the grant be effective immediately - "flush privileges;"
23. Commit changes by typing "commit;"
24. Return to the MediaWiki webpage and click on the hyperlink, it will show you a status saying you are ready to install MediaWiki and show you a form. Fill out the details and disable all e-mail related stuff. Enter the DB name as wikidb, user and password as wikiuser and leave the root id etc blank.
25. Hit install MediaWiki and wait for it to complete.

Thats it!

You are done!

I did this just now and am typing this article on the Wiki that I installed.

0 comments: