welcome: please sign in

Revision 3 as of 2007-11-16 04:07:38

Clear message
Edit

MemberManual / WebApplications / MoinMoin

This page explains how to quickly set up a MoinMoin wiki on one of your domains.

TableOfContents

New wiki

We already have MoinMoin installed on our system. All you need to do is copy a few files over, make a moin.cgi file, and add some DomTool configuration.

Copying files

Here's what you need to do to copy the files over. We assume that $INSTANCE is where you'd like to store the wiki data, and $USER is your username.

mkdir -p $INSTANCE
cp -r /usr/share/moin/data $INSTANCE
cp -r /usr/share/moin/underlay $INSTANCE
cp /usr/share/moin/config/wikiconfig.py $INSTANCE
fs setacl $INSTANCE $USER.daemon read
fsr setacl $INSTANCE/data $USER.daemon write
fsr setacl $INSTANCE/underlay $USER.daemon read

Thanks to jdrake for figuring this out.

Making a moin.cgi file

You can find an existing moin.cgi file at /usr/share/moin/htdocs/moin.cgi. Copy it into the same directory as the other MoinMoin stuff.

cp /usr/share/moin/htdocs/moin.cgi $INSTANCE

Then, you'll want to comment out the following line, by placing a "#" in front of it.

sys.path.insert(0, '/etc/moin')

Adding to your Domtool configuration

There are several ways to do this, depending on what URL you want to use to access your wiki. What you place on your "alias" line, we will call $HTDOCS: people commonly use either moin or wikidata there.

Here's an example of putting the wiki on a new subdomain called "wiki", with a typical page in the wiki looking like http://wiki.DOMAIN.TLD/SomePage.

  web "wiki" with
    alias "$HTDOCS" "/usr/share/moin/htdocs";
    scriptAlias "/" (home "$INSTANCE/moin.cgi/");
  end;

Here's an example of putting the wiki into an existing domain, under the path "/wiki". A typical page in the wiki will look like http://www.DOMAIN.TLD/wiki/SomePage.

  web "www" with
    (* Some other stuff ... *)

    alias "$HTDOCS" "/usr/share/moin/htdocs";
    scriptAlias "/wiki" (home "$INSTANCE/moin.cgi");
  end;

Modifying wikiconfig.py

As the final step, you will want to edit wikiconfig.py, which resides in your $INSTANCE folder. Remember the directory that you called $HTDOCS from the previous section, and use it below.

Change the line:

    url_prefix = '/wiki'

to:

    url_prefix = '$HTDOCS'

At this point, check out the rest of that file to set, for example, your site name. When done, tell domtool to update your configuration, and point a browser at your new wiki installation.

Migrating old MoinMoin wikis