Setting up MoinMoin on CentOS

MoinMoinMoinMoin is a great and simple wiki package built out of Python. We previously had it setup on an older machine, but since the order was given to reorganize the wiki, thought I’d take the time to just set it up on a new machine with the latest version. Only problem is I don’t remember it being this difficult. The install documentation isn’t very clear from my point of view, but that doesn’t stop me!

So download the package, untar, and ran the setup script:

python install --record=install.log --prefix='/usr/local' --install-data=/var/www/moin

I set install-data to /var/www/ to simply keep web related things in one place, but really didn’t have to. With that done, time to setup the wiki’s directory structure.

I created it at /var/www/html/wiki. Copy and data/ and underlay/ from the install-data directory. Now in the install-data directory is moin.wsgi config file. Edit it to find the location of the MoinMoin python files(eg /usr/local/lib/python2.4/). Then its time to edit the apache config.

Add ‘WSGISocketPrefix /var/run/htpd’ to the main httpd config(not inside any VirtualHost sections). The default setting doesn’t work. Then I added the following to my main site config:

<Directory /var/www/html/wiki/data>
        Order Deny,Allow
        Deny from all

WSGIScriptAlias /wiki /var/www/moin/share/moin/server/moin.wsgi
WSGIDaemonProcess moinwiki user=apache group=apache processes=5 threads=10 maximum-requests=1000 umask=0007
WSGIProcessGroup moinwiki

First section protects the data/ directory, then the WSGI directives point to the config file and setup the daemon.

Now I configure things in the file. Its mostly self-explainitory, though the part where it asks for the front page is a tricky step. There are two options, one for single language, and the second for multiple languages. Go for the second option, when I went for the first, I would get message in the website error log about missing pages from the underlay/ directory.

With the second option taken, restart httpd, then visit the wiki, create the superuser account and then the final step that I had to research to find. You have to go to the language setup page and tell it which help pages to setup, otherwise there is nothing there. You reach that page by going to /LanguageSetup?action=language_setup. Its just wasn’t obvious to me that this was needed, plus there is no link to it on the wiki itself.

Now with that taken care of, the wiki is ready to go.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s