How to Install MoinMoin on Your Memory Stick

Please note that this guide is written to Windows users, as I am one, and will need some adaptation for Linux. It'll also be simpler for Linux because Python may already be installed.

Step 1 - Prerequisites

  1. A flash drive with a minimum of 107mb worth free space. This will fit both Python 2.6.6 and MoinMoin 1.9.4, after a vanilla extraction.

  2. Python 2.6.6 is recommended.

  3. UniversalExtractor, to avoid registry settings and shortcuts thanks to Python not providing _binaries_ but an installer for Windows.

Step 2 - Extraction

The first thing to do is install Universal Extractor. There's nothing you can do to get around it unless you don't mind the possible registry mess that might otherwise occur.

It's a very simple process: open Universal Extractor, then open the python .msi installer, and extract to a temporary location. Note that MSI extraction can be messy and/or flawed, so give the python executable a quick whirl and see if it explodes brilliantly. If not, then you're good to go. :D

Now extract the MoinMoin archive to the python directory. This will end up with the wiki being in a subdirectory with a naming scheme of "moin-#version" like "moin-1.9.4".

Step 3 - the Server Batch File

Note that you could do this several ways, but I am doing this so that a command prompt is always visible so that I can easily stop the process just by closing the prompt. This way I can even take my flash-drive to the library and work on my things there.

Put the following into a batch file (I named it wiki.cmd) within your python folder. Obviously, you will have to maintain the version number yourself if you upgrade the wiki or start with a different version.

@echo off
cmd /c "python moin-1.9.4/wikiserver.py"

Step 4 - Last Stop for Gas!

Load up the wikiconfig.py from your wiki directory and configure the parameters as you wish. Change the name, front page, logo, and secret as you wish. Or don't; later will work too.

Some more configuration steps will follow after the first start of the Wiki. See the browser page http://localhost:8080/

If you want to load plugins, themes, or any sort of customizations then do it now. Writing to a flash-drive can be ponderous, so take advantage of your harddrive's better speed before the last steps.

Step 5 - Security

Now, you're likely to be using this wiki for many things private to you. While it's highly mobile and can move to any Windows system, so far as I know, it is also quite easy to lose. To prevent the loss or theft of such sensitive data, please consider using TrueCrypt to protect your wiki.

True Crypt works like a virtual harddrive that is fully encrypted, so you launch it to mount your secured "wiki-zone" and then call the batch file. Then once you are wrapping up, kill Python and then True Crypt.

How to set True Crypt partitions up is beyond the scope of this tutorial, so please see its own documentation.

Step 6 - Load 'em Up, Move 'em Out!

If you have a True Crypt partition, ensure it is loaded prior to putting the files on the key.

If you don't have True Crypt, move the temporary folder to your flash-drive.

And don't forget to test your new wiki by launching the batch file, and then going to http://localhost:8080/! (It may take as many as 30 seconds for the server to boot from the key.)

Notes

MoinMoin isn't actually designed to be run on the flash-drive, so it will use up your writes somewhat faster. That said, I'm quite certain it'll take a number of years to wear the flash-drive out. After some testing, however, I find the feasibility somewhat doubtful and would suggest that you keep the wiki on your computer rather than your memory stick. If you know how to turn caching off, the wiki would be suitable to place on a flash drive.

Don't forget that the transfer speed of the flash-drive will slow the speed of the server somewhat, most noticeably during booting the server.

And don't forget that if you have Apache2 on your memory key already, that you could probably use mod_python to bundle it with the rest of your things.

MoinMoin: PortableMoin (last edited 2012-06-07 10:59:00 by fw-cistec)