How to install moinmoin-2 on dreamhost?

I'm putting this here, so I can find it in the future. Maybe it is useful to other people too.

I found it challenging because:

  • it needs python2.7, and dreamhost has 2.4, 2.5, 2.6
  • it needs Flask, which I've never used before
  • it needs virtualenv
  1. Install python2.7, from parts 1 to 3 of https://stackoverflow.com/questions/10953695/update-django-1-4-and-python-2-7-3-with-virtualenv-on-dreamhost-with-passenger
  2. Download moin-2.0, eg from hg:

    hg clone http://hg.moinmo.in/moin/2.0 moin-2.0

  3. cd moin-2.0
  4. edit the quickinstall to comment out the line $VIRTUALENV --no-site-packages --python $PYTHON $DIR || exit 1
    • this is so that you can create your own env directory
  5. rm -R the old moin-2.0/env directory
  6. Use virtualenv to create the env directory, making sure to add the option --no-site-packages
  7. Run ./quickinstall
  8. Follow the moin instructions to build indexes and so on
  9. In your dreamhost control panel, create a new subdomain, with 'passenger' activated, and some path ending in /public, but not the moin-2.0 directory itself. Let's call this path $SITE/public, so $SITE is the parent director of the public directory
  10. In $SITE, create the following file called passenger_wsgi.py:

    import sys, os
    INTERP = '/path/to/moin-2.0/env/bin/python'
    if sys.executable != INTERP: os.execl(INTERP, INTERP, *sys.argv)
    from MoinMoin.app import create_app
    application = create_app('/path/to/moin2.0/wikiconfig.py')

    (you need to replace /path/to/moin2.0 with the directory of your moin-2.0 directory)

  11. Create a file $SITE/tmp/restart.txt (or touch it if it already exists)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.