Contents
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:
aptitude install python-moinmoin
or... apt-get install python-moinmoin
.. and a few seconds after, you're done.
Then you need to actually configure it. You will need to setup apache and your wiki instances. You can find the debian documentation on how to do the rest of the installation in: /usr/share/doc/moinmoin-common/README.Debian
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:
- Alias /wiki "/usr/share/moin/htdocs/"
ScriptAlias /MyWiki "/var/www/moin/mywiki/moin.cgi"
Depending on your version, you may have to change the alias as here:
- Alias /moin_static171/ "/usr/share/moin/htdocs/"
Question: Why ist moin_staticXXX used and not /wiki anymore?
Because users confused that static url and the wiki script URL all the time as long as we had that /wiki URL for the static stuff.
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:
- # /etc/init.d/apache2 restart
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:
- # cp /etc/moin/mywiki.py /etc/moin/mywiki.py.original
first we have to edit /etc/moin/farmconfig.py:
- Change name of wiki from mywiki to whatever you want (or leave it as mywiki if you used mywiki in the statements above)
- Change data underlay dir to data_underlay_dir = '/usr/share/moin/underlay/'
then edit /etc/moin/mywiki.py (or whatever you named it before)
- Change sitename and wikiname to your wiki's name
- Change datadir to data_dir = '/var/lib/moin/mywiki/data/'
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:
DebianUpgrade, how to upgrade your existing Debian Moin (if you cannot follow the short documentation in README.Debian in the package).
HelpOnUpdating, on general instructions for any Moin upgrade protocol.
Enjoy...
Debian Sarge, with apache2 and mod_python
Debian Sarge isn't supported anymore
Debian doesn't provides security updates any more for Sarge.
- 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
- 1.Configure apache2
- Add the following lines to /etc/apache2/conf.d/wiki:
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>
- 1.Reload apache2
/etc/init.d/apache2 reload
- 1.Configure Moinmoin
- 1.Edit /etc/moin/farmconfig.py
wikis = [
("mywiki", r"^yoursite.com/mywiki/.*$"),
]- 1.Or you can use. This will work for www.yoursite..., /mywiki/ ,and /mywiki
wikis = [
("mywiki", r".*"), # this is ok for a single wiki
]- 1.Also, in /etc/moin/farmconfig.py comment out data_dir and data_underlay_dir (we need those defined separately for each wiki) 1.Copy this file, If its not in there then don't worry about it.
# cp /etc/moin/moinmaster.py /etc/moin/mywiki.py
- 1.Then edit /etc/moin/mywiki.py
sitename = u'MyWiki' # [Unicode] data_dir = '/var/www/mywiki/data' data_underlay_dir = '/var/www/mywiki/underlay'
- 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:
- www.yoursite.com/mywiki/
- yoursite.com/mywiki
- 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:
- 1.7.1 is not quite "fresh". think about using some more recent package or just using the download version.
- don't use mod_python, rather use mod_wsgi - it is much better
- the Alias should be /moin_static171 (for moin 1.7.1)
