Edgewall Software

Changes between Initial Version and Version 1 of TracOnWindowsIis6


Ignore:
Timestamp:
Nov 2, 2004, 4:18:16 AM (19 years ago)
Author:
GeoffCant
Comment:

First attempt at IIS6 install guide

Legend:

Unmodified
Added
Removed
Modified
  • TracOnWindowsIis6

    v1 v1  
     1== Windows Installation Instructions for Subversion w/Trac 0.7.1 ==
     2
     3For:
     4 * Windows 2003 Server SP1
     5 * IIS 6
     6
     7(note: this page is heavily cribbed from TracOnWindows)
     8
     9Versions used in this example (Available 2004-11-01):
     10 * [http://httpd.apache.org/ Apache 2.0.52]
     11 * Python 2.3.4
     12 * Subversion 1.1.1
     13 * SQLite 3.0.8
     14 * PySQLite 1.0-py2.3
     15 * Trac 0.7.1
     16 * docutils 0.3.5
     17 * clearsilver 0.9.12 (included in Trac .exe installer)
     18
     19''For Subversion issues on Windows see the [http://tortoisesvn.tigris.org TortoiseSVN] site, particularly the server section.'' 
     20
     21Trac running on Microsoft's Internet Information Server (IIS) is _highly_ experimental. See #692 #693 and #697.
     22
     23Trac running without Apache or IIS:  using [source:trunk/README.tracd#latest tracd] and svnserve is experimental (''tracd'') but the performance improvement is ''very'' significant over cgi.  See TracOnWindowsSansApacheOrIis (TBD).
     24
     25----
     26Note: This example installs to F: (for extra points, then goes DarkReign hard with a seperate application pool and so on.)
     27----
     28
     29=== Arm Yourself ===
     301. Get & Read book
     31  http://svnbook.red-bean.com
     32
     33=== Install Subversion Pre-Requisites ===
     342. Install Python
     35  http://www.python.org
     36  [[br]]Add F:\Python23 to path
     37  Note that installing to a path that contains spaces is likely to break the install (iis6 doesn't seem to like cgi interpreters with spaces in their path).
     38
     393. Install IIS
     40  Control panel, Configure server roles...
     41
     424. Install Subversion
     43  http://subversion.tigris.org (remember to get the python bindings as well)
     44
     455. Install docutils
     46  http://docutils.sourceforge.net/
     47{{{
     48  expand and run from the expanded docutils-xxx directory
     49  > D:\python23\python install.py
     50}}}
     51
     52=== Create Repository ===
     536. Create repository
     54{{{
     55F:\> svnadmin create f:\tracsvn
     56}}}
     57
     588. Create skeleton repository structure in f:\temp\project
     59  Example:
     60{{{
     61/project
     62  /vendor
     63    /tags
     64    /trunk
     65      files
     66  /projectname
     67    /branches
     68    /tags
     69    /trunk
     70      files
     71}}}
     72
     739. Build repository tree
     74{{{
     75f:\> svn import f:\temp\project file:///f:/tracsvn/ -m "Initial Load"
     76}}}
     77
     7810. Create local sandbox
     79{{{
     80f:\> svn checkout file:///f:/svn/repo1 f:\project
     81}}}
     82
     83=== Configure IIS ===
     84
     8511. Create the Service-Trac (local) user
     86 * Add Service-Trac to the IIS_WPG (local) group
     87
     8812. Allow the Service-Trac user to run cgi scripts.
     89 * Grant Service-Trac the following permissions in the 'Local Security Policy' control panel:
     90  * Security Settings > Local Policies > User Rights Assignment > Adjust Memory Quotas for a process
     91  * Security Settings > Local Policies > User Rights Assignment > Replace a process level token
     92  * Together these permission allow the Service-Trac user to run cgi scripts.
     93  * Add Service-Trac to the IIS_WPG group (it's going to be the identity for an IIS Application pool.
     94  * See [http://www.microsoft.com/resources/documentation/iis/6/all/proddocs/en-us/ca_configcgi.mspx] for more information.
     95
     9613. Add a Python CGI web service extension to IIS
     97  In the IIS control panel add a new web service extension.
     98  The required file is [F:\Python23\python.exe -u "%s" %s]. You will also need to enable this extension.
     99
     10014. IIS virtual directories
     101  Add a virtual directory for /trac in the IIS control panel. It doesn't need execute permissions of any description as that will be taken care of by /trac/cgi-bin. Map this to [F:\Python23\share\trac\htdocs].
     102
     103  Add a cgi-bin vdir under /trac in the IIS control panel. It needs script execute permissions. Map this to [F:\Python23\share\trac\cgi-bin].
     104
     10515. IIS Application Pool
     106  Add a new application pool in the IIS control panel.
     107  Change the Identity of the new pool to Configurable and enter the details for the Service-Trac user you defined earlier.
     108
     109  Change the Application settings of the /trac/cgi-bin vdir: click Configuration and select the Mappings tab. Add a new mapping.
     110 * Executable: [F:\Python23\python.exe -u "%s" %s] - note that this must be identical to the web service extension added earlier
     111 * Extension: [py]
     112 * Verbs: All verbs
     113 * Script Engine: checked
     114 * Verify that file exists: unchecked
     115
     116 Change the Application Pool setting of the cgi-bin vdir to the pool you just created.
     117
     11816. Fix up permissions
     119  Change the ownership of F:\tracsvn to Service-Trac. You may also need to change the ownership or grant write/modify on F:\Python23\Lib\site-packages\trac to Service-Trac (so it can write pyc files). Service-Trac will need read access to F:\Python23\share\trac
     120
     121=== Install Trac Prerequisites ===
     12217. Install Subversion Python Bindings
     123  (Get from same download page as Subversion)
     124  [[br]]Copy libsvn and svn directories to D:\Python23\Lib
     125
     12618. Install SQLite
     127  http://www.sqlite.org
     128  [[br]]Copy sqlite.exe to D:\Program Files\SQLite
     129  This is really optional. Don't let it mess your disk unless something exceptional not described here happens.
     130
     13119. Install PySQLite
     132  http://pysqlite.sourceforge.net
     133
     13400. Install ClearSilver
     135  http://www.clearsilver.net
     136  NOT necessary if you use the Trac .exe installer - go back and download it ;)
     137
     13820. Install Trac
     139  http://www.edgewall.com/products/trac/
     140{{{
     141python ./setup.py install
     142}}}
     143
     144=== Fix a few things ===
     145
     14623. Copy CGI
     147{{{
     148D:\> copy d:\python23\share\trac\cgi-bin\trac.cgi d:\progra~1\apache~1\apache2\cgi-bin
     149}}}
     150
     151=== Configure Trac DB ===
     152
     153The trac database can be named to match the subversion repository it is working with, which is especially useful if more than one repository will ever be created. In this example {{{"trac.db"}}} would read as {{{"repo1.db"}}}
     154
     15525. Run trac-admin
     156{{{
     157D:\Python23\Scripts> python trac-admin d:/svn/trac.db
     158}}}
     159
     16026. Initialize DB
     161{{{
     162Trac [d:/svn/trac.db]> initdb
     163}}}
     164or
     165{{{
     166Trac [d:/svn/trac.db]> initenv
     167}}}
     168{{{
     169  Enter project name
     170    Project
     171  Enter path to repository
     172    d:\svn\repo1
     173  Enter path to templates
     174    d:\Python23\share\trac\templates
     175}}}
     176
     177If you get an error here stating that libdb42.dll was not found, copy ''[SVN PATH]''\bin\libdb42.dll to ''[PYTHON PATH]''\lib\libsvn\, then try again.
     178
     17927. (BUG) Load Wiki
     180{{{
     181Trac [d:/svn/trac.db]> wiki load d:/python23/share/trac/wiki-default
     182}}}
     183
     18428. Add administrative permissions (the below adds all permissions for 'admin' user)
     185{{{
     186Trac [d:/svn/trac.db]>
     187
     188permission add admin TRAC_ADMIN
     189}}}
     190
     191=== Add Trac to Apache ===
     192
     19329. Edit httpd.conf:
     194  Add: (copy this - there's a typo in Edgewall's version)
     195{{{
     196# TRAC
     197Alias /trac "D:/Python23/share/trac/htdocs"
     198
     199<Location "/cgi-bin/trac.cgi">
     200  SetEnv TRAC_ENV "d:/svn/trac.db"
     201</Location>
     202
     203<Location "/cgi-bin/trac.cgi/login">
     204  AuthType Basic
     205  AuthName "Project"
     206  AuthUserFile D:/svn/.htaccess
     207  Require valid-user
     208</Location>
     209
     210<Directory "D:/Python23/share/trac/htdocs">
     211  Options Indexes MultiViews
     212  AllowOverride None
     213  Order allow,deny
     214  Allow from all
     215</Directory>
     216
     217
     218}}}
     219
     220  Alternatively you could set up the authorisation to use your NT domain login if you are running an NT Domain.  This bit of Apache config replaces the <Location "/cgi-bin/trac.cgi/login"> given above.
     221{{{
     222<Location "/cgi-bin/trac.cgi/login">
     223  #NT Domain auth config
     224  AuthType SSPI
     225  SSPIAuth On
     226  SSPIAuthoritative On
     227  SSPIOfferBasic On
     228  AuthName "Project"
     229  Require valid-user
     230</Location>
     231}}}
     232  You'll also need the sspi_auth_module on your system and loaded like this...
     233{{{
     234LoadModule sspi_auth_module modules/mod_auth_sspi.so
     235}}}
     236 Or compile it into Apache.
     237
     23830. Restart Apache
     239
     24031. Hold your breath, test Trac install
     241  http://[hostname]:80/cgi-bin/trac.cgi
     242
     243  If it doesn't work, then running Apache from the command-line will give you a few clues.
     244
     245  If your page seems to be lacking stylesheets, you've probably run into a known Apache bug described (and worked around) [http://www.apache.org/dist/httpd/binaries/win32/#xpbug here].
     246
     247=== Finally... ===
     24832. Install Subversion clients as necessary (try [http://rapidsvn.tigris.org RapidSVN] & [http://tortoisesvn.tigris.org/ TortoiseSVN])
     249
     25033. Don't forget to lock down the security on the box!
     251
     25234. Now go get a *real* drink