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.

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. (MoinMoin 1.5.3 is available for Debian Sarge via www.backports.org).

For more info, see:

Enjoy... :)

Debian Sarge, with apache2 and mod_python

Debian Sarge isn't supported anymore
Debian doesn't provides security updates any more for Sarge.

  1. Apache2 and mod_python should be installed by now.Install moinmoin.

# apt-get install python-moinmoin
# mkdir /var/www/mywiki
# cp -r /usr/share/moin/data /usr/share/moin/underlay /usr/share/moin/server/moin.cgi /var/www/mywiki
# chown -R www-data:www-data /var/www/mywiki
# chmod -R g+w /var/www/mywiki

 Alias /wiki/ "/usr/share/moin/htdocs/"
 <Location /mywiki>
 SetHandler python-program
 PythonPath "['/var/www/mywiki','/etc/moin/']+sys.path"
 PythonHandler MoinMoin.request::RequestModPy.run
 PythonDebug On
 </Location>

 /etc/init.d/apache2 reload

 wikis = [
           ("mywiki",    r"^yoursite.com/mywiki/.*$"),
       ]

wikis = [
    ("mywiki",  r".*"),   # this is ok for a single wiki
]

 # cp /etc/moin/moinmaster.py /etc/moin/mywiki.py

 sitename = u'MyWiki' # [Unicode]
 data_dir = '/var/www/mywiki/data'
 data_underlay_dir = '/var/www/mywiki/underlay'
  1. Comment out any other data_dir that might exist there.

    1.Enjoy your new wiki at http://yoursite.com/mywiki/ 1.Thanks to http://lucasmanual.com/mywiki/

How to?
I don't know how to make these work:

- use DynDNS and ddclient

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


Some comments:

MoinMoin: MoinMoinPackages/DebianLinux (last edited 2010-02-03 20:33:52 by FranklinPiat)