I have installed Python
2.4 and followed the instruction for installing MoinMoin wiki moin-1.3. (IIS5.1 under XP)
Windows
Installation using IIS
This is pre-1.3
stuff that still has to be adapted to 1.3. If nobody feels like having to
update it, this instructions will be deleted soon. Although it says this is
pre-1.3 stuff I have adopted this as I have no idea how should I install for
1.3 Would someone tell me what is the installation procedure for 1.3?
I
am running Windox XP and Python2.4 and IIS5.1
Before
creating a wiki instance, you have to download and install the basic MoinMoin
software. We assume you already have downloaded the distribution archive to the
"C:\TEMP" directory.
Open
a console window and enter the following commands:
C:cd \tempunzip moin-1.3.zipcd moin-1.3python setup.py install --prefix=C:\Moin --record=install.log
This
will install all necessary files to the "C:\Moin"
directory, and create a "install.log" file listing all the files that are created there.
Creating
a Wiki Instance
Enter
these commands in a console window:
cd \Moinmd mywikimd mywiki\datamd mywiki\underlayxcopy share\moin\data mywiki\data /Excopy share\moin\underlay mywiki\underlay /Ecopy share\moin\server\moin.cgi mywiki\copy share\moin\htdocs\index.html mywiki\default.htm
"mywiki" is the
name of your wiki instance, you might want to chose a different name best
fitting the intended use of this instance; just don't name it simply "wiki", because
that would result in confusion and problems later on.
We
have to make sure that moin.cgi can find the MoinMoin directory, so that "import MoinMoin"
will work. The easiest way to make sure MoinMoin can be imported
is to append to sys.path within
moin.cgi.
You
can change the first two lines of code in moin.cgi to something like this:
Toggle line numbers
1
2 import sys
3 sys.path.append(r'C:\Moin\Lib\site-packages')
Notice
that we're pointing to the directory which contains the MoinMoin directory, not
the directory itself.
Next,
you'll need to create two virtual directories in IIS. One for the shared data,
and one for this specific wiki instance.
Go
to Control Panel =>
Administrative Tools => Internet Information Service.
Open up the tree to Default
Web Site.
Right
click on Default Web
Site and choose New => Virtual directory. This
will bring up a wizard with the manditory useless first screen, hit next. Enter
"wiki" for the alias name and hit next. Browse to "C:\Moin\share\moin\htdocs" and hit next. Leave the Access permissions at their
defaults and hit next. And now you're done, hit finish!
Now
follow the same steps, but set the alias to "mywiki" and the
path to "C:\Moin\mywiki".
Use
IIS Admin to remove permissions to read the data directory: expand the "mywiki" node,
right click on data, select Properties, and uncheck Read. Repeat these steps with the underlay directory.
Now
you need to setup the 'mywiki' alias so that it will run Python to interpret .cgi files. Right
click on your new 'mywiki' alias and choose Properties. On the first tab (Virtual Directory),
click the Configuration
button. The first tab is the App Mappings tab, which defines which programs to
use for each file exetension. Click Add. Browse to your python.exe (probably
something like c:\pythonXX\python.exe). Then add -u %s %s after the Python executable path. The Executable
line will look something like this: C:\Python22\python.exe -u %s %s. In the Extension box enter .cgi with the
begining period. Confirm that the Check that file exists option
is not checked (if it is, MoinMoin won't be able to display sub pages). Ok,
you're done with the alias configuration, click OK several times to get back
out of all the dialog boxes.
If
you add another wiki instance, you'll only need to setup the reference to its
folder, they can safely share the "wiki" alias
which points to static files only.
That
is all, try to access your new-born wiki with the URL "http://127.0.0.1/mywiki/".
This is my moin.cgi file under c:\Moin\mywiki
directory:
#!python
# -*- coding: iso-8859-1 -*-
"""
MoinMoin - CGI Driver
Script
<at> copyright: 2000-2004 by
Jürgen Hermann <jh <at> web.de>
<at> license: GNU GPL, see
COPYING for details.
"""
# System path configuration
# The path to MoinMoin package and
configuration files. Note that the
# path is the path of the directory where the
item lives, not the path
# to the item itself!
# If you did a standard install, and you are
not a developer, you
# probably want to skip these settings.
import sys
sys.path.append(r'C:\Moin\Lib\site-packages')
## sys.path.insert(0, '/path/to/MoinMoin/dir')
## sys.path.insert(0,
'/path/to/wikiconfig/dir')
## sys.path.insert(0,
'/path/to/farmconfig/dir')
from MoinMoin.request import RequestCGI
request = RequestCGI()
request.run()
After I had completed my
installation steps, I am trying to access wiki using http://127.0.0.1/mywiki
and get the following error:
CGI
Error
The specified CGI application misbehaved by not
returning a complete set of HTTP headers. The headers it did return are:
C:\Moin\Lib\site-packages\MoinMoin\multiconfig.py:97:
UserWarning: import of config "wikiconfig" failed due to "No
module named wikiconfig"; default configuration used instead.
warnings.warn(err)
Traceback (most recent call
last):
File "C:\moin\mywiki\moin.cgi",
line 29, in ?
request.run()
File
"C:\Moin\Lib\site-packages\MoinMoin\request.py", line 655, in run
self.open_logs()
File
"C:\Moin\Lib\site-packages\MoinMoin\request.py", line 1052, in
open_logs
sys.stderr = open(os.path.join(self.cfg.data_dir, 'error.log'), 'at')
IOError: [Errno 2] No such
file or directory: 'wiki\\data\\error.log'