~ubuntu-branches/ubuntu/natty/moin/natty-updates

« back to all changes in this revision

Viewing changes to wiki/underlay/pages/HelpOnInstalling(2f)InternetInformationServer/revisions/00000001

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2008-06-22 21:17:13 UTC
  • mfrom: (0.9.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080622211713-fpo2zrq3s5dfecxg
Tags: 1.7.0-3
Simplify /etc/moin/wikilist format: "USER URL" (drop unneeded middle
CONFIG_DIR that was wrongly advertised as DATA_DIR).  Make
moin-mass-migrate handle both formats and warn about deprecation of
the old one.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
## Please edit system and help pages ONLY in the moinmaster wiki! For more
2
 
## information, please see MoinMaster:MoinPagesEditorGroup.
 
1
## Please edit system and help pages ONLY in the master wiki!
 
2
## For more information, please see MoinMoin:MoinDev/Translation.
3
3
##master-page:Unknown-Page
4
4
##master-date:Unknown-Date
5
 
#acl MoinPagesEditorGroup:read,write,delete,revert All:read
 
5
#acl -All:write Default
6
6
#format wiki
7
7
#language en
8
 
 
9
 
'''Index'''
10
 
[[TableOfContents]]
11
 
 
12
 
== Requirements ==
13
 
 
14
 
Before you install MoinMoin:MoinMoin, make sure you have the necessary infra-structure in place, namely the ''Internet Information Services'' webserver (any version should be OK), and a ''Python'' installation (version 2.3 is required, the latest python release is recommended).
15
 
 
16
 
In the following description, we assume that you have installed or will install things to these locations:
 
8
'''Index''' <<TableOfContents>>
 
9
 
 
10
== Requirements & Preparation ==
 
11
Before you install MoinMoin, make sure you have the necessary infrastructure in place, namely the ''Internet Information Services'' webserver (any version should be OK), and a ''Python'' installation (at least version 2.3 is required, the latest python release is recommended).
 
12
 
 
13
These instructions make the basic assumption that you will have these components installed in their default locations. In reality, you'll probably have them installed elsewhere (on the D: drive, for example). Be careful to substitute your drive and paths based on the following assumed default locations:
 
14
 
17
15
 * IIS to its default location
18
 
 * `C:\Python` - the Python interpreter
19
 
 * `C:\Moin` - Moin``Moin itself
20
 
 
21
 
Quite often, you might want to install things elsewhere, which is no problem at all; you just have to adapt any paths that appear in a command or config file to the locations you have chosen.
22
 
 
23
 
This installation procedure was tested with IIS 5.1 for Windows running on Windows XP SP2, using Python 2.4.
24
 
 
25
 
== Preparation ==
26
 
 
 
16
 * {{{C:\Python}}} - the Python interpreter
 
17
 * {{{C:\Moin}}} - !MoinMoin itself
 
18
== Installation ==
27
19
=== Installing IIS ===
28
 
 
29
20
From Microsoft: (http://www.microsoft.com/windows2000/en/server/iis/)
30
21
 
31
 
  To install IIS, add components, or remove components:
32
 
 
33
 
  Click Start, point to Settings, click Control Panel and start the Add/Remove Programs application. 
34
 
  Select Configure Windows, click the Components button, and then follow the on-screen instructions 
35
 
  to install, remove, or add components to IIS. 
36
 
 
37
 
Make sure that your webserver runs without problems before you start to install Moin``Moin; problems with your webserver installation are not in the scope of this document.
 
22
 1. To install IIS, add components, or remove components:
 
23
  i. Click Start => Settings => Control Panel => Add/Remove Programs.
 
24
  i. Click 'Add/Remove Windows Components', Check 'Internet Information Services' and follow the on-screen instructions to install. ( /!\ it is also recommended to click the 'details' button and un-selecting components you will not need. This will depend on your server role; but for example, you probably will not need FTP, or "Frontpage 2000 Server Extensions").
 
25
Make sure that your webserver runs without problems before you start to install !MoinMoin; problems with your webserver installation are not in the scope of this document.
38
26
 
39
27
=== Installing Python ===
40
 
 
41
 
Download [http://www.python.org/ftp/python/2.3.4/Python-2.3.4.exe Python 2.3.4] and install it. Python installation is done via a standard Windows installer program.
42
 
 
43
 
Alternatively, you may download the [http://www.activestate.com/Products/ActivePython/ ActivePython distribution] as a Microsoft Installer package.
 
28
There are currently two different distributions of Python available for Windows. Either version will work fine.
 
29
 
 
30
 1. http://www.python.org - The standard open-source Python distribution.
 
31
  * The installer is a windows executable (.exe) file.
 
32
 1. http://www.activestate.com - An alternative, commercially-supported, distribution (distributed for free (email address required)).
 
33
  * The installer is a Windows .MSI file.
 
34
  * If you are or plan to develop in the Python language, !ActivePython has some tools specific to the Windows operating system and includes a popular Windows IDE called Pythonwin.
 
35
!MoinMoin works with either distribution, but requires Python release 2.3 or later. Download and install the distribution of your choice. Be sure your Python installation is correct before proceeding. Installation is straightforward; however, any questions or issues regarding the Python installation process should be resolved through the use of resources provided by Python.org or !ActiveState.
44
36
 
45
37
=== Installing MoinMoin ===
46
 
 
47
 
Before creating a wiki instance, you have to download and install the basic Moin``Moin software. We assume you already have downloaded the distribution archive to the "`C:\TEMP`" directory.
48
 
 
49
 
Open a console window and enter the following commands:
50
 
{{{
 
38
 1. '''Download !MoinMoin'''
 
39
  * The most current version is here: MoinMoin:MoinMoinDownload
 
40
 1. '''Expand the archive'''
 
41
  * __''Note:''__ users of older versions of [[http://www.winzip.com|WinZip]] report problem expanding .tar.gz files. Either upgrade or use the free [[http://7-zip.org/|7-Zip]] utility.
 
42
  * Expand the archive into {{{C:\TEMP}}} or an alternative location.
 
43
  * You should then have a folder such as {{{C:\TEMP\moin-x.x}}} where "x.x" is the current release number. This folder will contain a {{{setup.py}}} file in addition to several other files and subfolders.
 
44
 1. '''Run Setup.py from the commandline'''
 
45
  * Open an DOS window (start > Run... > type {{{cmd}}}) and enter the commands:<<BR>>
 
46
  {{{
51
47
C:
52
48
cd \temp
53
 
unzip moin-1.3.zip
54
 
cd moin-1.3
 
49
unzip moin-1.6.zip
 
50
cd moin-1.6
55
51
python setup.py install --prefix=C:\Moin --record=install.log
56
52
}}}
57
 
 /!\ TODO: fix instructions for .tar.gz format used by recent moin versions.
58
 
 
59
 
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.
60
 
 
61
 
[[FootNote]]
62
 
 
63
 
== Creating a Wiki Instance ==
64
 
 
65
 
Enter these commands in a console window from C:\Moin:
 
53
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.
 
54
 
 
55
You are now ready to create a wiki instance.
 
56
 
 
57
== Configuration ==
 
58
=== Creating a Wiki Instance ===
 
59
Enter these commands in a console window from C:\Moin>:
 
60
 
66
61
{{{
 
62
cd c:\Moin
67
63
md mywiki
68
64
md mywiki\data
69
65
md mywiki\underlay
73
69
copy share\moin\config\wikiconfig.py mywiki\
74
70
copy share\moin\htdocs\index.html mywiki\default.htm
75
71
}}}
76
 
 
77
 
"`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.
78
 
 
79
 
We have to make sure that `moin.cgi` can find the Moin``Moin 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`.
 
72
"{{{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.
 
73
 
 
74
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}}}.
80
75
 
81
76
You can change the first two lines of code in moin.cgi to something like this:
82
 
{{{#!python
 
77
 
 
78
{{{
 
79
#!python
83
80
#!python
84
81
import sys
85
82
sys.path.append('C:/Moin/Lib/site-packages')
86
83
}}}
87
 
Notice that we're pointing to the directory which contains the Moin``Moin directory, not the directory itself.
88
 
 
89
 
Next, you'll need to create two virtual directories in IIS. One for the shared data, and one for this specific wiki instance. 
90
 
 
91
 
Go to ''Control Panel => Administrative Tools => Internet Information Service''. Open up the tree to ''Default Web Site''. 
92
 
 
93
 
Right click on ''Default Web Site'' and choose ''New => Virtual directory''. This will bring up a wizard with the mandatory 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!
94
 
 
95
 
Now follow the same steps, but set the alias to "`mywiki`" and the path to "`C:\Moin\mywiki`". 
96
 
 
97
 
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.
98
 
 
99
 
Now you need to setup the 'mywiki' alias so that it will run Python to interpret `.cgi` files. On Windows Server 2003, you will need to click the ''Create'' button under ''Application Settings'' to create an application space. 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. Make sure that the ''Check that file exists'' option is not checked (if it is, Moin``Moin 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.
100
 
 
101
 
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.
102
 
 
103
 
That is all, try to access your new-born wiki with the URL "`http://127.0.0.1/mywiki/`". You should see the Front``Page, try to edit and save it, and if that works, see if your edit is reflected on the Recent``Changes page.
104
 
 
105
 
Finally, edit "`wikiconfig.py`" and at least change "`sitename`" and "`logo_string`" to some personal values:
106
 
{{{
107
 
sitename = u'My Wiki'
108
 
logo_string = u'<img src="/mywiki/images/mywiki-logo.gif" alt="MyWiki Logo">My Wiki'
109
 
}}}
110
 
Where "`images`" is a directory under your "`mywiki`" instance.
111
 
 
112
 
NOTE: The configuration variable "`url_prefix`" in "`wikiconfig.py`" should match the alias for "`C:\Moin\share\moin\htdocs`" or themes will not work ("`/wiki`" for the instructions above).  This way, any reference in "`wikiconfig.py`" to "`/wiki/something`" will look in the shared data directory and a reference to "`/mywiki/something`" will look in the wiki instance directory.  These are considered absolute paths because relative paths will not work correctly.
113
 
 
114
 
'''Since MoinMoin 1.3.5''', it seems you need to change the Custom Errors setting for 404 before you can create new pages. You can accomplish this by performing the following steps:
115
 
 
116
 
 1. Go into the IIS Manager, right-click on 'mywiki' (or whatever your wiki instance directory is called), and select properties.
117
 
 
118
 
 2. Next, go to the Custom Errors tab and find the 404 entry, and click the ''Set to Default'' button.
119
 
 
120
 
 
121
 
=== IIS 6.0 (Windows Server 2003) ===
122
 
 
123
 
The instructions below also apply to IIS 6.0 but the more aggressive security settings in newer version of IIS disallow the usage of ''unknown CGI extensions''.  That means you will always get a 404 error unless you do this:
124
 
 
125
 
 1. Open IIS Manager by going to Start Menu->Programs->Administrative Tools->IIS Manager.
 
84
Notice that we're pointing to the directory which contains the !MoinMoin directory, not the directory itself.
 
85
 
 
86
=== Configuring IIS ===
 
87
Next, you'll need to create two virtual directories in IIS. One for the shared data, and one for this specific wiki instance.
 
88
 
 
89
==== Configuring IIS 5.0 and above ====
 
90
 1. Open '''Internet Services Manager''' (Start > Settings > Control Panels > Administrative Tools > ...). Open up the tree to ''Default Web Site''.
 
91
 
 
92
 1. Right click on ''Default Web Site'' and choose ''New > Virtual directory''.
 
93
  i. This will bring up a wizard with the mandatory useless first screen, hit next.
 
94
  i. Enter "{{{wiki}}}" for the alias name, hit next.
 
95
  i. Browse to "{{{C:\Moin\share\moin\htdocs}}}", hit next.
 
96
  i. Leave the ''Access permissions'' at their defaults, hit next.
 
97
  i. And now you're done, hit finish!
 
98
 
 
99
 1. Now follow the same steps, but set the alias to "{{{mywiki}}}" and the path to "{{{C:\Moin\mywiki}}}".
 
100
 
 
101
 1. Use IIS Admin to remove permissions to read the data directory:
 
102
  i. expand the "{{{mywiki}}}" node
 
103
  i. right click on {{{data}}}
 
104
  i. select {{{Properties}}}
 
105
  i. and uncheck {{{Read}}}.
 
106
  i. Repeat these steps with the {{{underlay}}} directory.
 
107
 
 
108
 1. Now you need to setup the 'mywiki' alias so that it will run Python to interpret {{{.cgi}}} files.
 
109
  i. On Windows Server 2003, click the ''Create'' button under ''Application Settings'' to create an application space.
 
110
 
 
111
  i. Right-click on your new 'mywiki' alias and choose ''Properties''. On the first tab (''Virtual Directory''), click the ''Configuration'' button.
 
112
 
 
113
  i. The first tab is the ''App Mappings'' tab, which defines which programs to use for each file extension.
 
114
 
 
115
  i. Click ''Add''. Browse to your {{{python.exe}}} (probably something like {{{c:\pythonXX\python.exe}}}).
 
116
 
 
117
  i. 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 beginning period.
 
118
 
 
119
  i. Make sure that the ''Check that file exists'' option is not checked (if it is, !MoinMoin won't be able to display sub pages).
 
120
 
 
121
  i. Ok, you're done with the alias configuration, click ''OK'' several times to get back out of all the dialog boxes.
 
122
 
 
123
 1. 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.
 
124
==== IIS 6.0 (Windows Server 2003) ====
 
125
The instructions below also apply to IIS 6.0 but the more aggressive security settings in newer version of IIS disallow the usage of ''unknown CGI extensions''. That means you will always get a 404 error unless you do this:
 
126
 
 
127
 1. Open '''IIS Manager''' (Start > Programs > Administrative Tools > IIS Manager).
126
128
 
127
129
 1. Go to the '''Web Service Extensions''' folder.
128
130
 
129
131
 1. Under the '''Action''' menu, select '''Add a new Web service extension...'''.
130
132
 
131
 
 1. For Extension name, give it a name such as ''.cgi'' or ''Python cgi'' or something.
 
133
 1. For Extension name, give it a name such as ''.cgi'' or ''Python cgi'' or similar.
132
134
 
133
 
 1. Under '''Required files''' click the '''Add...''' button and type in the exact command-line string you used above. Eg: ''c:\python24\python.exe -u "%s" "%s"'', then click the '''Ok''' button.
 
135
 1. Under '''Required files''' click the '''Add...''' button and type in the exact command-line string you used above. Eg: {{{c:\python24\python.exe -u "%s" "%s"}}}, then click the '''Ok''' button.
134
136
 
135
137
 1. Make sure the '''Set extension status to Allowed''' checkbox is checked and click the '''Ok''' button.
136
 
 
137
 
Another change that may be necessary if you are receiving HTTP Error 403 19 1314 while using IIS 6.0 is to adjust the Identity settings for the Application Pool that is being used by your site.  The following steps assume you are adjusting the Default Web Site.
138
 
 
139
 
 1. Open IIS Manager by going to Start Menu->Programs->Administrative Tools->IIS Manager.
 
138
Another change that may be necessary if you are receiving HTTP Error 403 19 1314 while using IIS 6.0 is to adjust the Identity settings for the Application Pool that is being used by your site. The following steps assume you are adjusting the Default Web Site.
 
139
 
 
140
 1. Open '''IIS Manager''' (Start > Programs > Administrative Tools > IIS Manager).
140
141
 
141
142
 1. Go to the '''Application Pool''' folder.
142
143
 
143
 
 1. Select the Application Pool you wish to adjust. (likely '''Default``App``Pool''' ) When you do this on the right you will see the Application pools for each site on the server.  This will include a Description (likely '''Default Application''' )and a Path ('''<Default Web Site>''').  In this way you can be certain you are adjusting the appropriate Application Pool.
144
 
 
145
 
 1. With '''Default``App``Pool''' still selected right click and select '''Properties'''.
146
 
 
147
 
 1. Select the '''Identity''' tab and with '''Predefined''' clicked use the drop down box to change the '''Identity''' to '''Local System''' instead of Network Service.
148
 
 
149
 
 ''Please be aware that this is a workaround since you SHOULD set your group settings to allow Network Service to access the cgi scripts.''
150
 
 
151
 
Under Windows Server 2003, you will also need to give your IUSR_MACHINENAME account Modify access to the mywiki\data and mywiki\underlay sub-directories, as file system permissions are more restricted by default than previous Windows versions.
152
 
 
 
144
 1. Select the Application Pool you wish to adjust. (likely '''!DefaultAppPool''' ) When you do this on the right you will see the Application pools for each site on the server. This will include a Description (likely '''Default Application''' ) and a Path ('''<Default Web Site>'''). In this way you can be certain you are adjusting the appropriate Application Pool.
 
145
 
 
146
 1. With '''!DefaultAppPool''' still selected right click and select '''Properties'''.
 
147
 
 
148
 1. Select the '''Identity''' tab and with '''Predefined''' clicked use the drop down box to change the '''Identity''' to '''Local System''' instead of Network Service. ''Please be aware that this is a workaround since you SHOULD set your group settings to allow Network Service to access the cgi scripts.''
 
149
Under Windows Server 2003, you will also need to give your IUSR_MACHINENAME account ''Modify'' access to the mywiki\data and mywiki\underlay sub-directories, as file system permissions are more restricted by default than previous Windows versions.
 
150
 
 
151
That is all, try to access your new-born wiki with the URL http://127.0.0.1/mywiki/. You should see the !FrontPage, try to edit and save it, and if that works, see if your edit is reflected on the !RecentChanges page.
 
152
 
 
153
=== Configuring wikiconfig.py ===
 
154
Finally, edit "{{{wikiconfig.py}}}" and at least change "{{{sitename}}}" and "{{{logo_string}}}" to some personal values:
 
155
 
 
156
{{{
 
157
sitename = u'My Wiki'
 
158
logo_string = u'<img src="/mywiki/images/mywiki-logo.gif" alt="MyWiki Logo">My Wiki'
 
159
}}}
 
160
Where "{{{images}}}" is a directory under your "{{{mywiki}}}" instance.
 
161
 
 
162
NOTE: The configuration variable "{{{url_prefix}}}" in "{{{wikiconfig.py}}}" should match the alias for "{{{C:\Moin\share\moin\htdocs}}}" or themes will not work ("{{{/wiki}}}" for the instructions above). This way, any reference in "{{{wikiconfig.py}}}" to "{{{/wiki/something}}}" will look in the shared data directory and a reference to "{{{/mywiki/something}}}" will look in the wiki instance directory. These are considered absolute paths because relative paths will not work correctly.
 
163
 
 
164
It seems you need to change the Custom Errors setting for 404 before you can create new pages. You can accomplish this by performing the following steps:
 
165
 
 
166
 1. Go into the IIS Manager, right-click on 'mywiki' (or whatever your wiki instance directory is called), and select properties.
 
167
 
 
168
 1. Next, go to the Custom Errors tab and find the 404 entry, and click the ''Set to Default'' button.
153
169
== Troubleshooting ==
154
 
 
155
 
If you see an error like "{{{ImportError: No module named MoinMoin}}}", it means that python cannot find Moin``Moin. See above for how to add to `sys.path`.
156
 
 
157
 
If you see an error like Error 13: Permission Denied, it means that your web user permissions for the files do not have write/modify enabled.
158
 
 
159
 
If the page never loads after hitting `Save Changes`, you should check the permissions of the `data` directory.  Make sure the IUSR_COMPUTERNAME user has modify permissions.
160
 
 
161
 
If some images like InterWiki and WorldWideWeb don't show up, it could have been because of incorrect permissions or a bad "`url_prefix`" in "`wikiconfig.py`" or the cached pages need to be updated by an Edit or deleting them in the data folder. Or you are using MS IE which has broken CSS :before support - try another browser.
162
 
 
163
 
If you see an error message like:
164
 
{{{
 
170
 * If you see an error like "{{{ImportError: No module named MoinMoin}}}", it means that python cannot find Moin``Moin. See above for how to add to {{{sys.path}}}.
 
171
 * If you see an error like Error 13: Permission Denied, it means that your web user permissions for the files do not have write/modify enabled.
 
172
 * If the page never loads after hitting {{{Save Changes}}}, you should check the permissions of the {{{data}}} directory. Make sure the IUSR_COMPUTERNAME user has modify permissions.
 
173
 * If some images like !InterWiki and !WorldWideWeb don't show up, it could have been because of incorrect permissions or a bad "{{{url_prefix}}}" in "{{{wikiconfig.py}}}" or the cached pages need to be updated by an Edit or deleting them in the data folder. Or you are using MS IE which has broken CSS :before support - try another browser.
 
174
 * If you see an error message like:<<BR>>
 
175
 {{{
165
176
Check your URL regular expressions in the "wikis" list in "farmconfig.py". Content-type: text/html;charset=utf-8
166
177
MoinMoin Configuration Error
167
178
Could not find a match for url: "servername/wikiname/moin.cgi?
168
179
Check your URL regular expressions in the "wikis" list in "farmconfig.py".
169
180
}}}
170
 
 
171
 
and you don't intend on using a serverfarm, remove the farmconfig.py and farmconfig.pyc files and try again.  The error message shouldn't appear when you refresh the page. 
172
 
 
173
 
If you are using URLScan, you might have to add the following setting in the file `%SystemRoot%\system32\inetsrv\urlscan\urlscan.ini`: {{{
 
181
  and you don't intend on using a serverfarm, remove the farmconfig.py and farmconfig.pyc files and try again. The error message shouldn't appear when you refresh the page.
 
182
 * If you are using URLScan, you might have to add the following setting in the file {{{%SystemRoot%\system32\inetsrv\urlscan\urlscan.ini}}}:<<BR>>
 
183
 {{{
174
184
[options]
175
185
AllowHighBitCharacters=1
176
186
}}}
 
187
 
 
188
 
 
189
== Next Steps ==
 
190
 * Backing up !MoinMoin is simple. Look at HelpOnInstalling/Win32MoinEasyBackup for guidance (despite the somewhat misleading title, the procedure would be the same for IIS).