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 to your wiki directory, where your is (I copied C:\Python25\share\moin\server\ to D:\MoinWikiLocation\SueDon)

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

    # Path of the directory where is located.
    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 from D:\MoinWikiLocation\SueDon

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

You will have to edit D:\MoinWikiLocation\SueDon\ 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:

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 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 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 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: