Using MoinMoin

Installing Moinmoin on a Dreamhost account

Installing Moinmoin on a shared hosting setup like mine at Dreamhost needs a slight change. Dreamhost provides a wsgi environment using Passenger, for which the following steps are necessary:

  1. Follow the instructions at Dreamhost to enable wsgi for your account. Ensure that you do not lose existing data because of the creation of the public directory in your site.

  2. Download moinmoin and install it in a directory outside the public/ directory of your site. Let's assume it is installed at SITEHOME/local/moin, where SITEHOME is your website directory (which contains the public/ directory)

  3. Make a directory in SITEHOME called wiki. Create two directories under it called data and underlay. Copy the contents of wiki/data and wiki/underlay directories of the moinmoin installation into the respective directories here. This is as per the official instructions of moinmoin.

  4. Copy the file wikiconfig.py from the wiki/config directory of your moin installation into SITEHOME/wiki. Edit it as per the moinmoin installation instructions.

  5. Copy the file moin.wsgi from wiki/server/ directory of your moin installation into SITEHOME and name it passenger_wsgi.py. Edit this file as per the moinmoin installation instructions for the wsgi file.

And you are set. This should be enough for you to start off with your wiki. Remember to make your id the superuser in the wikiconfig.py file, and register yourself on the wiki right away.

Adding local python module installations

If you are using features in MoinMoin which requires external Python modules, you need to add these modules to your installation. Let us take the example of docutils, which is required to use the ReStructured Text (rst) format to write markup in MoinMoin.

To add this library, you can download and install the docutils code in your account, somewhere outside of your document root. You can use the --prefix parameter to tell setup.py where to install the code. For example, you can use the following command line:

    python setup.py install --prefix=SITEHOME/local 2>&1 | tee -a install.log

This will install docutils binaries in SITEHOME/local/bin and libraries in SITEHOME/local/lib/pythonX.X/site-packages/.

To tell MoinMoin about these libraries, you have to add this library path to the wsgi file. So in passenger_wsgi.py file, just after the last sys.path.insert, you can insert this path too. I prefer appending it, e.g. with this line:

    sys.path.append('SITEHOME/local/lib/python2.5/site-packages/')

After this, just kill the running wsgi program using pkill python, and access any MoinMoin page of your installation. The wsgi file will be restarted, and you can access a page using this new library to confirm if it works. e.g. for testing docutils installation, you can check the HelpOnParsers/ReStructuredText page to see if the examples work.

Excluding Directories from Moinmoin

If there are directories under your website where you want to serve other documents or applications, you will find all of them are getting caught by moinmoin (actually Passenger). To exclude any directory under SITEHOME/public from being served by a Passenger WSGI app, add the following into a file named .htaccess in the directory.

PassengerEnabled Off

Comments

Add your comments here.

DreamhostMoinmoin (last edited 2010-06-15 23:02:23 by SandipBhattacharya)