Debian Installation - HowTo

See bottom for apache2 and mod_python. The debian version of this is very easy to get and setup. However, for a first time user there are quite a few steps that you might find a touch tricky. For experts all you need to do is:

1. install apache

2. configure the apache web server to point to the MoinMoin code

3. install the moinmoin package

4. configure the moinmoin package

5. restart apache

For those of you reading this that aren't experts, here is a guided setup of the MoinMoin package.

Install the Packages

Just type one of the following:

or...     apt-get install python-moinmoin

or... /usr/share/doc/python-moinmoin/README.Debian.gz

If you can't be bothered reading this file it says the following:

# mkdir -p /var/www/moin/mywiki
# cp -r /usr/share/moin/server/moin.cgi /var/www/moin/mywiki
# mkdir -p /var/lib/moin/mywiki
# cp -r /usr/share/moin/data /usr/share/moin/underlay /var/lib/moin/mywiki
# chown -R www-data:www-data /var/lib/moin/mywiki /var/www/moin/mywiki
# chown -R www-data:www-data /usr/share/moin/underlay

Change all occurences of mywiki into name of your choice. Be careful! You have to be very consistent in naming. Every mistake can cause failure. Pay attention to the last copy command. You want to copy 'data' and 'underlay' into '/var/lib/moin/mywiki', so there may not be any trailing slashes!

Configure Apache

(In brackets are the file and command names for apache2. for example for Kubuntu 6.06) Add the following lines to /etc/apache/httpd.conf (/etc/apache2/apache2.conf) to configure the Apache Web Server to be able to find the moinmoin code so it can execute it was required:

Depending on your version, you may have to change the alias as here:

Question: Why ist moin_staticXXX used and not /wiki anymore?

If you are using default Apache2 installation, place this inside /etc/apache2/sites-enabled/000-default inside <VirtualHost> directive. In case you have more VirtualHosts on your installation, place it under that one you want to use it from.

Restart the Apache Web Server with the following command:

Configure MoinMoin Instance

Now you have to go and configure your MoinMoin instance. You do that by editing the file /etc/moin/farmconfig.py

Then copy mywiki.py (already provided by Debian) to backup copy:

first we have to edit /etc/moin/farmconfig.py:

then edit /etc/moin/mywiki.py (or whatever you named it before)

surf to http://localhost/MyWiki - you should have it working

Also, if you have been so bold as to play with unofficial or older testing/unstable packages then beware that you also need to do the migration yourself (there is no way the package can guess where and how you set up your instances).

Current Versions Available

See MoinMoin's page in the package tracking system for the current package version.

For more info, see:

Enjoy... :)

Problems with Lenny

I did a fresh install of moinmoin 171 in Debian lenny (stable) and I got this error

AttributeError: module 
'/var/lib/python-support/python2.5/MoinMoin/request/__init__.pyc' contains no 
'RequestModPy'

To put moinmoin to work I followed the below from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=477491

I was able to get it working by changing a line in my apache configuration from:
PythonHandler MoinMoin.request::RequestModPy.run
to:
PythonHandler MoinMoin.request.request_modpython::Request.run

I also needed to change an alias to get css working from:
Alias /wiki /usr/share/moin/htdocs
to:
Alias /moin_static171 /usr/share/moin/htdocs

More Problems with Lenny

Package: python-moinmoin Version: 1.7.1-3+lenny5

/etc/moin/farmconfig.py & /etc/moin/mywiki.py Are installed with incorrect permissions causing the following error when following these instructions:

ImportError: No module named wikiconfig

Check that the file is in the same directory as the server script. If
it is not, you must add the path of the directory where the file is
located to the python path in the server script. See the comments at
the top of the server script.

Check that the configuration file name is either "wikiconfig.py" or
the module name specified in the wikis list in farmconfig.py. Note
that the module name does not include the ".py" suffix.

Error in your configuration file
"/var/lib/python-support/python2.5/MoinMoin/config/multiconfig.py"
around line 45.

Solution: chmod 644 /etc/moin/*

See bug report for more info: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=601733


Some comments:

Archive

MoinMoin: MoinMoinPackages/DebianLinux (last edited 2011-08-31 14:35:17 by MaFeu)