Sunday, April 17

a wiki, kwikly

No, not KwikiKwiki or even the better understood twiki. What I'm going to describe is a download, install, configure, tweak session that actually ended up with something useful. A wiki, right quickly. And not just any wiki, but the mighty Wikipedia. This is probably going to be broken up into several parts because I tend to natter excessively. I'll try not to get distracted meanwhile.

Why am I doing this ?
I don't really understand the point of a wiki. Ironic that I linked to perhaps the best known wiki of them all for a definition, isn't it ? But I love the idea of a collaborative encyclopedia that anyone can edit. I haven't reached that point in my life where I have sufficient disposable income to shell out ... a few thousand of $currency_unit to grab all the volumes of Britannica. I do, on the other hand, have access to a reasonably fast internet connection. So, Wikipedia became the poor mans Britannica for me. Then it became a bit more. Because Wikipedia is a lot more current that the fuddy duddy print versions. Tsunami on the 26th of December ? Well, the wiki entry was one of the better ways to stay informed. flashmob ? metrosexual ? Those additions to the lexicon were defined and explained by Wikipedia long before the more conventionally distributed encyclopedias got their act together.

The problem is, I'm not always near an internet connection of any description. And even more distressingly, sometimes the Wikipedia servers can be a touch slow. The latter may get fixed at some point, but the former isn't really going to change anytime soon, so I need my Wikipedia fix while I'm offline. I have the hard disk space, I thirst for knowledge. And hey, I'm just curious at the amount of effort necessary to get it running and I like wasting bandwidth. Any (or all) of those reasons apply. And having a massive test corpus of reasonably sensible English sentences is a bit of a side benefit in my line of work.

The engine which powers the mighty information dispensing Wikipedia juggernaut is named MediaWiki. Free (licensed under the GPL) and relatively simple for the amount of heavy lifting that it does. The first step (all you need for a shiny wiki of your very own) is to install the MediaWiki engine. Onwards.

What you need:
Apache. 1.3.x is ok. 2.0.x is better.
PHP. 4.3.x is good. 5.0.x is ok, though perhaps not as well supported yet. I've configured machines with either version and minimal (like: almost no) tweaking was required.
MySQL. 4.1.x is probably a better idea than the beta 5.x at the moment.

Of course, you could just be lazy and check out any one of the following all-in-one installers:
WAMP server

I've run WAMP and XAMPP at one point or the other. Most people seem to prefer WAMP, but figure out what works for you. Of course, you could download and configure each piece of software individually, I prefer this route myself... I loved the slightly more customizable installers like ApacheToolbox, but sadly, that project seems to have died.

By the way. running a webserver on a machine without firewall protection is quite possibly a bad idea, so some security precautions are recommended. Like, don't allow the webserver to listen to any address except your own local machine (, for starters. This only applies if your machine will be connected to the internet, obviously :)

Additionally, if you want your own personal Wikipedia clone, you will need:
At least 3GB of hard disk space. If you don't have that much to play with, then the full Wikipedia is not for you.
The bandwidth and/or the patience to download at least 1GB of data. I lack patience, but I have access to a fast connection. Whatever works for you.
It might also help to have a relatively powerful machine at your disposal. Plenty of RAM (512mb is enough to run the Wikipedia on a local workstation AND get a reasonable amount of work done at the same time) and a fast hard disk are useful, although not strictly necessary. The beefier the instruments, the less patience you need.

Whee. Click on the installer, run it and generally get the PHP in your Apache talking to the MySQL. I'm not going to cover the mechanics of this step in any great detail because so many others have. Do what the url says.

At the end of this first step, you will have:
a webserver (probably Apache) running on your machine, with support for executing serverside php scripts
A mysql database on your machine

It would save a lot of grief in the next step if there is some familiarization with mysql tools. Most of the click-n-run installers come with a nifty web based admin tool for mysql databases named phpmyadmin. This is good for basic stuff, but at least one of the following steps will need a command line based tool.

Now, onto the next step; downloading the database dumps for Wikipedia... That's part 2.


<< Home