Jim Lawrence wrote a
great how-to on installing the MoinMoin wiki engine back in 2006. I've used it several times as guidance for installing my personal wiki.
Today there are newer versions of MoinMoin. With all due respect to Jim, several things have changed that make some of his tutorial outdated and incorrect
as it applies to the newer versions.
My plan is to outline how this is done using a modern version of the software. For those of you who don't know what MoinMoin is visit
The MoinMoin Wikipedia page. As usual there's a lot of information there from various sources. Of course there's
the MoinMoin Wiki too and many many other sites relating to it.
I've used MoinMoin for a few years now. I think that I probably started when Fedora 6 or 7 was popular. Over the last few years I've collected a few hundred pages of my personal Fedora (and other distribution) installation and configuration notes and have stored them on the wiki. It makes it incredibly easy to find what I'm looking for. I don't want to lose this stuff but I decided it was time to upgrade my "server" to Fedora 14. There's going to be trouble, and upgrading MoinMoin will be at the forefront of that trouble.
I fought with getting this application to work for a couple of days but, since I've used it for a long time and did not want to lose my data through Fedora release updates, I was determined that it
was going to work. After all, MoinMoin was offered through the Fedora repositories as
moin-1.9.3-2.fc14.noarch so it should work, right? It's in the repos. I should be able to download it and run it without trouble, no? No! Nope. Not going to happen. Time to roll up my sleeves and get to work. That said:
Here's how to install MoinMoin release 1.9.3-2.fc14.noarch running Fedora 14.
Install required packages, moin and mod_wsgi.
Code:
su
yum install moin mod_wsgi
Make some folders to copy your Moin installation to.
Code:
mkdir -p /var/www/moin/mywiki
cp -R /usr/share/moin/data /var/www/moin/mywiki
cp -R /usr/share/moin/underlay /var/www/moin/mywiki
cp /usr/share/moin/config/wikiconfig.py /var/www/moin/mywiki
Change some permissions for the newly created folders.
Code:
chown -R apache:apache /var/www/moin
chmod -R ug+rwX /var/www/moin
chmod -R o-rwx /var/www/moin
Backup
wikiconfig.py before making changes to it.
Code:
cp /var/www/moin/mywiki/wikiconfig.py /var/www/moin/mywiki/wikiconfig.py.bak
Edit wikiconfig.py using your favorite text editor.
Code:
nano /var/www/moin/mywiki/wikiconfig.py
There are a few initial changes that need to be made. In this file I've made the changes highlighted in red. Of course this is where you choose a name for the wiki and choose a user name for yourself. The user name should be in the form UserName, no spaces.
Code:
sitename = u'Wiki Name'
page_front_page = u"Wiki Name Home Page"
superuser = [u"MyUserName", ]
acl_rights_before = u"MyUserName:read,write,delete,revert,admin"
Backup the Apache configuration file
httpd.conf.
Code:
cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/http.conf.bak
Make a few changes to the Apache configuration file
/etc/httpd/conf/httpd.conf.
Code:
nano /etc/httpd/conf/httpd.conf
Change the following.
Code:
ServerName xxx.xxx.xxx.xxx:80
DocumentRoot "/var/www/moin"
<Directory "/var/www/moin">
While you're editing httpdf.conf look in the
!ScriptAliases section. Comment out this line using the # character.
Code:
#!ScriptAlias /mywiki "/var/www/moin/mywiki/moin.cgi"
Add the following line below that one.
Code:
WSGIScriptAlias /mywiki /var/www/moin/mywiki/moin.wsgi
The
moin.wsgi file needs to be copied to /var/www/moin/mywiki.
Code:
cp /usr/share/moin/server/moin.wsgi /var/www/moin/mywiki/
Run these commands again because we've added some files to
/var/www/moin.
Code:
chmod -R ug+rwX /var/www/moin
chmod -R o-rwx /var/www/moin
Set apache to start at boot and then start the service.
Code:
chkconfig --level 35 httpd on
service httpd start
You should not see any error output when the service starts. Try the wiki. Browse to
http://localhost/mywiki.
Remember that you may need to set SELinux to permissive before the wiki will work.
If you have problems (Yes, I had a few) you should reference the log files. They are an excellent resource for trouble shooting.
Code:
/var/log/messages
/var/log/secure
/etc/httpd/logs/access_log
/etc/httpd/logs/error_log
There are httpd logs in /var/log/httpd but I believe they are the same as the logs in /etc/httpd/logs/.
I was also on IRC #moin and talked with Thomas Waldmann. He's one of the lead developers of MoinMoin and help me get this all sorted.
I believe my work here is done. My wiki is working as I had expected it to, using the above instructions. If you think I missed something feel free to let me know, either in a reply here or through PM.
P.S. I did not lose my data. The old server is still running with all data intact. There is a script that is part of MoinMoin used for migrating data without loss but either it doesn't work or I just plain didn't understand the syntax / useage of the script (more than likely). I'm currently migrating using the tried and tested copy/paste method