Setting up a MoinMoin Wiki on Ubuntu

Tagged as Linux

Written on 2008-04-15 17:55:23

I had a bit of trouble with one or two things setting this up at work last week so here's a report from my side of the IT world for anyone who is looking to do this.

1) Don't apt-get moinmoin.
2) You will create a specific instance for your wiki separate from the base install. This is explained below.

Okay. So, first things first. Check to see if python is installed by running this on the command line:
python -v

then wget the tar from moinmoin:

extract it:
tar zxvf moin-1.6.2.tar.gz

and then run:
sudo python install --prefix='/usr/local' --record=install.log

This will get a basic install up and running. Now you need to create a wiki instance. You can create one wherever you like but I'd put it in /var/www/YOURWIKI or whatever you'd like to call it. The moinmoin folks have even created a handy script to take most of the work out of your hands and make sure the permissions are right. Grab and read that, decide where you'd like the files to go and then:

sudo ./ /var/www/YOURWIKI
sudo mkdir /var/www/YOURWIKI/cgi-bin
sudo cp /usr/local/share/moin/server/moin.cgi /var/www/YOURWIKI/cgi-bin/.
cd /var/www
sudo chown -R www-data:www-data YOURWIKI/cgi-bin
sudo chmod -R ug+rx YOURWIKI/cgi-bin
sudo chmod -R o-rwx YOURWIKI/cgi-bin

Your instance is installed, now you just have to set the config files up to point to it. Add the following two lines to /etc/apache2/httpd.conf where the Alias is /moin_staticYOURVERSIONNUMBER:

Alias /moin_static162/ /usr/local/share/moin/htdocs/
ScriptAlias /tvswiki /var/www/tvswiki/cgi-bin/moin.cgi

Set the path to your wiki to /var/www/YOURWIKI in /var/www/YOURWIKI/cgi-bin/moin.cgi
Set the data dir and underlay dir to their (absolute, i.e. /var/www/YOURWIKI/WHATEVER) paths in /var/www/YOURWIKI/
Restart apache with
sudo /etc/init.d/apache2 restart

and you're done!
Of course, the next thing to look into will be setting up groups and ACLs and theming it. Happy Hacking!
comments powered by Disqus

Unless otherwise credited all material Creative Commons License by Brit Butler