MoinMoin is a Python WikiClone, based on PikiPiki. To install it on ArchLinux and run it with apache httpd, follow these steps:
- Install MoinMoin and dependencies:
$ pacman -S moinmoin mod_python
- Look into the SHARE directory, usually /usr/share/moin – this is where the templates are located
- data directory (wiki pages, users, etc.) – only MoinMoin should access this
- underlay directory (wiki pages) – only MoinMoin should access this
- htdocs directory with html support files – the web server will need to access this
- server – MoinMoin example startup files (like moin.cgi for CGI)
- config – MoinMoin example configuration files (like wikiconfig.py)
- Choose a wiki name (Here I choose the default ‘mywiki’) and create a directory for the wiki
$ mkdir /home/http/mywiki
- Copy the files.
$ cp -R /usr/share/moin/data /home/http/mywiki $ cp -R /usr/share/moin/underlay /home/http/mywiki $ cp /usr/share/moin/config/wikiconfig.py /home/http/mywiki
- Install moin.cgi
$ mkdir /home/http/mywiki/cgi-bin $ cp /usr/share/moin/server/moin.cgi /home/http/mywiki/cgi-bin/
- Change permissions
$ chown -R http:http /home/http/mywiki $ chmod -R ug+rwX /home/http/mywiki/ $ chmod -R o-rwx /home/http/mywiki
- Configure moin.cgi: insert this line after the import sentences
sys.path.insert(0, '..')
- Configure Apache.
$ vim /etc/httpd/conf/httpd.conf
First, load the mod_python module
LoadModule python_module /usr/lib/httpd/modules/mod_python.so
Next, setup Alias and ScriptAlias
Alias /wiki/ "/usr/share/moin/htdocs/" ScriptAlias /mywiki "/home/http/mywiki/cgi-bin/moin.cgi"
Finally, setup access permissions.
<Directory /usr/share/moin/htdocs> Order deny,allow Allow from all </Directory> - Configure MoinMoin
$ vim /home/http/mywiki/wikiconfig.py
Modify these parameters.
data_dir = '../data/' data_underlay_dir = '../underlay/' url_prefix = '/wiki'
Uncomment this line.
url_prefix_static = '/mywiki' + url_prefix_static
- Restart the apache server
$ /etc/rc.d/httpd restart or $ apachectl restart
- Test the wiki
Start the browser and access the URL http://127.0.0.1/mywiki/
References
- MoinMoin Official Wiki: HelpOnInstalling
- ArchWiki: Mod_Python


现在还要从aur上装一个python-beaker的包,大家别杯具了
[Reply]
also, if the name is not mywiki, but wiki. Don’t put “Alias …”.
[Reply]