wiki:MoinInstall
Last modified 12 years ago Last modified on 05/08/06 13:34:25

A huge variety of Wiki software exists, each package having different features and system requirements. I chose MoinMoin for the SIG Wiki because it provides good support for code samples which is essential to system documentation. It is also relatively user-friendly (for example, you can set editing textbox size and custom stylesheets in UserPreferences). MediaWiki also provides a good user experience but has higher system requirements that I considered unnecessary.

Installation Procedure

I downloaded the tar file and build an rpm according to instructions at http://moinmoin.wikiwikiweb.de/MoinMoinPackages

wget 'http://heanet.dl.sourceforge.net/sourceforge/moin/moin-1.3.4.tar.gz'
rpmbuild -tb moin-1.3.4.tar.gz 
rpm -Uhv /usr/src/redhat/RPMS/noarch/moin-1.3.4-1.noarch.rpm
mkdir /usr/local/moin

This installs the python modules and Wiki templates. I then set up an instance of the wiki as detailed at http://moinmoin.wikiwikiweb.de/HelpOnInstalling/WikiInstanceCreation using this script:

#!/bin/sh
export PREFIX=/usr          
export SHARE=$PREFIX/share/moin
export WIKILOCATION=/usr/local/moin
export INSTANCE=sigwiki        

export USER=apache
export GROUP=apache           

cd $WIKILOCATION
mkdir $INSTANCE                   # make a directory for this instance
cp -R $SHARE/data $INSTANCE       # copy template data directory
cp -R $SHARE/underlay $INSTANCE   # copy underlay data directory
cp $SHARE/config/wikiconfig.py $INSTANCE   # copy wiki configuration sample file

chown -R $USER.$GROUP $INSTANCE   # check that USER and GROUP are correct
chmod -R ug+rwX $INSTANCE         # USER.GROUP may read and write
chmod -R o-rwx $INSTANCE          # everybody else is rejected

The final step was to set up Apache with these configuration directives

# See http://moinmoin.wikiwikiweb.de/HelpOnInstalling/ApacheWithModPython
# 

# The system templates
Alias /wiki "/usr/share/moin/htdocs/"
ScriptAlias /sigwiki "/usr/local/moin/sigwiki/moin.cgi"

After making sure it worked correctly, I also added a spellchecker dictionary at mywiki/data/dict/en_us.ascii and removed the non-English help files to speed up searches using the move_non-english.bash script at http://moinmoin.wikiwikiweb.de/ScriptMarket/RemovingUnwantedLanguages .

Multiple wikis

Of course, if you want multiple wikis on one server it gets more complicated. The installation guide is at http://moinmoin.wikiwikiweb.de/FarmQuestions but basically you create one shared configuration farmconfig.py and then set a few variables in a separate mywiki.py file and create only the mywiki/data/ directory.

Using pubcookie

I found it worked fine when using the mod_python backend to Moin. One gotcha is that mod_python must have full paths, where the CGI used paths relative to itself.

Alias /wiki "/usr/share/moin/htdocs/"
# below line not needed, using mod_python instead
#ScriptAlias /sigwiki "/usr/local/data/www/moin/moin.cgi"

<Location /sigwiki>
    Options +FollowSymlinks
    Include /etc/httpd/local_htaccess
    Require valid-user
    SetHandler python-program
    PythonPath "['/usr/local/data/www/moin/']+sys.path"
    PythonHandler MoinMoin.request::RequestModPy.run
</Location>

<Location /birswiki>
    AuthType UWNetID
    Require valid-user
    Options +FollowSymlinks
    SetHandler python-program
    PythonPath "['/usr/local/data/www/moin/']+sys.path"
    PythonHandler MoinMoin.request::RequestModPy.run
</Location>