Nothing to see here, move along please. This blog is only used to allow me to communicate between my tablets and my PCs.

Monday, November 12, 2007

Setting up MoinMoin as a Server under Windows

N. B. not Desktop MoinMoin

There is a general introduction to installing MoinMoin here: HelpOnInstalling. Scan this document but don't worry about it too much. We are going to install the Personal Wiki - StandaloneServer.

The standalone server is especially made for local wikis because it does not need a web server installed. Only Python and Moin are necessary!

To install and run the standalone server:

  1. If MoinMoin is not installed yet, perform ../BasicInstallationForWindows

  2. Create a wiki instance as described in ../WikiInstanceCreationForWindows

  3. Copy moin.py to your wiki directory, where your wikiconfig.py is (I copied C:\Python25\share\moin\server\moin.py to D:\MoinWikiLocation\SueDon)

  4. Edit D:\MoinWikiLocation\SueDon\moin.py. I made the following changes:

    # Path of the directory where wikiconfig.py is located.
    # YOU NEED TO CHANGE THIS TO MATCH YOUR SETUP.
    sys.path.insert(0, 'D:\MoinWikiLocation\SueDon')
    •     # Path to moin shared files (default '/usr/share/moin/wiki/htdocs')
      # If you installed with --prefix=PREFIX, use 'PREFIX/share/moin/wiki/htdocs'
      docs = 'C:\Python25\share\moin\htdocs'
        # Port (default 8000)
    # To serve privileged port under 1024 you will have to run as root.
    port = 8000
    # Interface (default 'localhost')
    # The default will listen only to localhost.
    # '' will listen to any interface
    interface = ''
  5. Run moin.py from D:\MoinWikiLocation\SueDon

  6. Access your wiki at http://localhost:8000/

You will have to edit D:\MoinWikiLocation\SueDon\wikiconfig.py to make other tweaks as you need.

Running MoinMoin as a Windows Service

Download and install the Windows Server 2003 Resource Kit. You need to use two utilities (InstSrv.exe and SrvAny.exe) from the Windows Server 2003 Resource Kit (this kit applies to XP too, 2003 Server is a newer version of XP). If you do not have these programs then you can download and install the Window 2003 Resource Kit from: http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en

Installation instructions are near the bottom of the page at this link.

The idea is to use InstSrv.exe to install SrvAny.exe as a service with a name of your choice, e.g. "moinmoin" and then to configure the moinmoin service to actually start the moin.py program from SrvAny.exe.]

You might need to read the Windows Resource Kit Help file entries for InstSrv.exe and SrvAny.exe if things go wobbly later on.

Install SrvAny.exe as the 'moinmoin' service

(Sorry about the trailing " being chopped off in the picture.)

Set up the login authorization for the moinmoin service.

Settings->Control Panel->Administrative Tools->Services->moinmoin->Log On->This account

Enter your account info and click OK.

Edit the Registry entry for the moinmoin service.

We need to set up the moinmoin service so that it's executable SrvAny.exe invokes Python.exe with moin.py as a parameter.

First go into Regedit and export a backup copy of your registry - just in case ...

Now go to HKEY_LOCAL_MACHINE->SYSTEM->Current Control Set->Services->moinmoin and edit its entry to look like this:

The following are Parameters to SrvAny.exe:

  • AppDirectory is the working directory

  • Application is the actual .exe file that will be called by SrvAny

  • AppParameters are the parameters (the moin.py file) passed to the `Application' (i.e. Python.exe)

Start the moinmoin service.

Settings->Control Panel->Administrative Tools->Services->moinmoin->Start

If it starts and runs then it will start automatically from now on.

No comments: