Edgewall Software

Changes between Version 190 and Version 191 of TracOnWindows


Ignore:
Timestamp:
Dec 14, 2006, 12:20:20 PM (17 years ago)
Author:
Christian Boos
Comment:

This is now about 0.10 (copied from TracOnWindows/Rewrite@22)

Legend:

Unmodified
Added
Removed
Modified
  • TracOnWindows

    v190 v191  
    1 = Trac on Windows Installation & Upgrade Guide =
    2 ----
    3  '''NOTE:''' While still containing useful bits of informations, this page is a bit dated and is in the process of being rewritten. For new installations of [milestone:0.10] (beta1 or rc1), you should have a look at TracOnWindows/Rewrite.
     1[[PageOutline(2-3)]]
     2= Trac on Windows =
    43
    5  ''Experimental use of Python 2.5 on Windows is covered in [wiki:TracOnWindows/Python2.5].''
    6 ----
    7 What follows are specific instructions for installing, setting up, and upgrading Trac on Windows.
     4== Install Python ==
    85
    9 Choose between these options of installing Trac:
     6Trac is written in [http://python.org Python], so you will first need to install it.
    107
    11  * [wiki:TracOnWindowsStandalone Trac running without Apache or IIS] using [source:trunk/README.tracd#latest tracd] and svnserve is the simplest setup. It is stripped for all optional dependencies. It might be taken as a first step to get things running. You should then be able to pick the missing steps from the Apache CGI based setup found on this page as a second step.
     8The recommended version of Python at this time is 2.4.3.  Many of Trac's dependencies are not available on Windows for Python 2.5, so that version is not yet recommended (but see [wiki:TracOnWindows/Python2.5 a workaround]).
    129
    13  * The 'traditional' [wiki:TracOnWindows#InstallationofSubversionandTracservedviaApacheCGI Apache CGI based setup] is described just below.
     10Download and run the Python MSI installer:
     11[http://www.python.org/ftp/python/2.4.3/python-2.4.3.msi python-2.4.3.msi]
    1412
    15  * Also, after installing the CGI-based setup, you may want to [wiki:TracModPython switch to using mod_python] which speeds up Trac's response times considerably.
     13Then add the path to the directory where you chose to install Python to your PATH environment variable.  This is important to be able to run the Python executable from any directory in the command line.
    1614
    17 If you are trying to upgrade to Trac 0.9, [wiki:TracOnWindows#UpgradingfromTrac0.84to0.9beta1onWindows see the instructions] at the end of this file.
     15== Experimental All-In-One Installer ==
    1816
    19 == Installation of Subversion and Trac served via Apache CGI ==
     17This installation script only requires a Python 2.4 installation and will download and install the basic Trac dependencies and optionally the Subversion libraries.
    2018
    21 Versions used in this example (Feb 2006):
    22  * Trac 0.9.x
    23  * [http://www.clearsilver.net Clearsilver 0.9.14 binaries]
    24  * [http://www.python.org Python 2.3.5]
    25  * [http://httpd.apache.org/ Apache 2.0.54 or 2.0.55]
    26  * [http://subversion.tigris.org Subversion 1.2.x]
    27  * [http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91&filter=_py.zip  Python 2.3 Bindings for subversion 1.2.x]
    28  * [http://initd.org/pub/software/pysqlite/releases/1.1/1.1.6/pysqlite-1.1.6.win32-py2.3.exe pysqlite-1.1.6.win32-py2.3]
    29  * [http://www.sqlite.org SQLite 3.2.2] (optional)
    30  * [http://www.egenix.com/files/python/eGenix-mx-Extensions.html eGenix.com mx Extensions for Python] ''(only required if using PostgreSQL)''
    31  * [http://sourceforge.net/project/showfiles.php?group_id=38414 docutils 0.3.9] (optional)
     19  1. Download and double-click this script to install Trac: [attachment:trac-0.10.1-win32-install.py?format=raw trac-0.10.1-win32-install.py]
     20  1. Download and run the installer for the Subversion command line tools: [http://subversion.tigris.org/files/documents/15/34093/svn-1.4.0-setup.exe svn-1.4.0-setup.exe] (only if you actually need to interface Trac with Subversion of course; since Trac 0.10, Subversion is not a requirement anymore)
     21  1. Once that's done you can skip ahead to [#GettingStarted Getting Started].
    3222
    33 '''Please update this Wiki page if you find it is different from your experience.'''
    34 If you have any problems, I would also suggest posting the solutions here for the common good.
    35 Please reference the version number you are having difficulties with, but assume that readers will be using the latest version (and issues from previous versions can disappear into wiki history)
    36 Contributors: please add your name to the list at the end - Thanks in advance!
     23If your network uses a web proxy server, you may have problems with the first step. You could try setting the HTTP_PROXY environment variable to refer to the proxy server. You can set this variable through Control Panel > System > Advanced > Environment Variables, or by using a command prompt from which you then run the script. In the latter example, you would "SET HTTP_PROXY=http://your.proxy.server:port" [enter] and then "trac-0.10.1-win32-install.py" [enter].
    3724
    38 ''For Subversion issues on Windows see the [http://tortoisesvn.tigris.org TortoiseSVN] site, particularly the server section.'' 
     25== Manual Installation ==
    3926
    40 ''Trac running on Microsoft's Internet Information Server (IIS) is __highly__ experimental. See #697.''
     27If you don't use the ''All-In-One Installer'', you'll have to download and install a few packages manually.
    4128
    42 === Learn Subversion ===
    43 1. Get & Read [http://svnbook.red-bean.com/ Version Control with Subversion ]
     29=== Setuptools ===
    4430
    45 === Install Subversion Pre-Requisites ===
    46 2. Install version 2.0 of [http://httpd.apache.org/ Apache ] (If you are running IIS, shut it down before installing Apache, and change its status to 'Manual' or 'Disable'). This '''must''' be version '''2.0''' of the apache server and not version 2.2 or the apache modules shipped with the latest subversion (1.3.2 at the time of writing) will not work!
     31[http://peak.telecommunity.com/DevCenter/setuptools Setuptools] makes installation of Python software easier by automatically downloading and installing Python packages from the internet.  It is also used to find and load [wiki:TracPlugins Trac's plugins].
    4732
    48 3. Install [http://subversion.tigris.org/ Subversion ]
    49  * [http://blogs.vertigosoftware.com/teamsystem/archive/2006/01/16/Setting_up_a_Subversion_Server_under_Windows.aspx How to Install Subversion on Windows]
     33Download the setuptools installer: [http://peak.telecommunity.com/dist/ez_setup.py ez_setup.py]
    5034
    51 Add C:\svn\bin to the path
     35When the download completes double-click the "ez_setup.py" file from your download folder to install setuptools.
    5236
    53 Note: Be sure to have the MSVCP60.DLL in your PATH, otherwise Apache will refuse to start with the SVN module.
     37=== The command line ===
    5438
    55 === Create Repository ===
    56 4. Create repository directory
     39You'll need to open a command line to install some of the necessary software:
     40
     41 1. Click "Start" > "Run..." (or press Win+R)
     42 1. Type "cmd" and click "Ok"
     43 1. Type "cd \Python24\Scripts"
     44
     45You should now be in the folder "C:\Python24\Scripts" where you can run the "easy_install" command to install the required software.
     46
     47Install the [http://www.clearsilver.net/ ClearSilver] template language:
    5748{{{
    58 C:\> md c:\svn
     49easy_install -f http://clearsilver.net/downloads clearsilver==0.9.14
    5950}}}
    6051
    61 5. Create repository
     52Install the [http://pysqlite.org PySqlite] database driver:
    6253{{{
    63 C:\> svnadmin create c:\svn\repo1
     54easy_install pysqlite
    6455}}}
    6556
    66 6. Create skeleton repository structure in c:\temp\project
    67   Example:
     57''TODO: setting up for PostgreSQL or MySQL''
     58
     59=== Subversion (optional) === #Subversion
     60====  ==== #svntools
     61Trac can integrate with the [http://subversion.tigris.org Subversion] version control software.  Follow these steps if you'd like to use Trac with Subversion.  You can learn more about how they can integrate from the wiki: TracSubversion.
     62
     63This document covers using the Subversion command line tools, but you can also use the [http://tortoisesvn.net/ TortoiseSVN] Windows GUI.
     64
     65Download and run the installer for the Subversion command line tools:
     66[http://subversion.tigris.org/files/documents/15/35379/svn-1.4.2-setup.exe svn-1.4.2-setup.exe]
     67
     68====  ==== #svnbindings
     69Go back to your command line to install the Subversion Python library:
    6870{{{
    69 /project
    70   /vendor
    71     /tags
    72     /trunk
    73       files
    74   /projectname
    75     /branches
    76     /tags
    77     /trunk
    78       files
     71easy_install -Z http://subversion.tigris.org/downloads/svn-python-1.4.2.win32-py2.4.exe
    7972}}}
    8073
    81 7. Build repository tree
     74'''Note:''' the "-Z" option is necessary when installing Subversion so that it is "unzipped".  Trac will not be able to access Subversion if it is zipped.
     75
     76=== Download Trac ===
     77
     78Download and run the latest stable Trac Windows installer:
     79[http://ftp.edgewall.com/pub/trac/trac-0.10.win32.exe trac-0.10.win32.exe]
     80
     81Or alternatively use the latest relatively stable release candidate:
     82[http://ftp.edgewall.com/pub/trac/trac-0.10.3rc1.win32.exe trac-0.10.3rc1.win32.exe]
     83
     84'''Note:''' do '''not''' run easy_install on the Trac installer.  This is not currently supported and Trac will not work correctly when installed this way.
     85
     86== Getting Started ==
     87
     88Ok, now that Trac and all its requirements have been installed you can create your first project and try it out.
     89
     90This example will create the projects in "C:\Projects".  This is a good default location, but you can put them in another drive or folder if you prefer.
     91
     92Back to the command line:
    8293{{{
    83 C:\> svn import c:\temp\project file:///c:/svn/repo1 -m "Initial Load"
     94cd \
     95mkdir Projects
     96cd Projects
    8497}}}
    8598
    86 8. Create local sandbox
     99'''Optional:''' if you're using Trac with Subversion you can create a new repository for your source code:
    87100{{{
    88 C:\> svn checkout file:///c:/svn/repo1 c:\project
     101mkdir svn
     102svnadmin create svn\my-project
    89103}}}
    90104
    91 === Configure Apache ===
    92 9. Copy Subversion module files for Apache
    93 {{{
    94 C:\> copy c:\Progra~1\Subver~1\bin\*.so c:\progra~1\apache~1\apache2\modules
    95 }}}
    96 You may also need to manually transfer the DLL files from the Subversion installation directory. If the Apache service will not start, or reports an error loading mod_dav_svn.so, you will need to do this. They contain, among other things, the Berkeley DB. This is all you need to do for the DLLs:
    97 {{{
    98 C:\> copy c:\progra~1\subver~1\bin\*.dll c:\progra~1\apache~1\apache2\modules
    99 }}}
    100 Make sure you don't have Apache 2.0.52 (mod_dav_svn.so is not compatible with that version, upgrade to 2.0.58 or newer).
     105=== Initialize a new Trac project environment: ===
    101106
    102 10. Create password file (w/user 'admin')
     107First go to the 'Scripts' folder in your Python install directory (e.g. "\Python24\Scripts"), and add the '.py' extension onto the files 'tracd' and 'trac-admin'.  Then, from the same folder, type the following at the command line:
    103108
    104109{{{
    105 C:\> c:\progra~1\apache~1\apache2\bin\htpasswd -cm c:\svn\.htaccess admin
     110mkdir trac
     111\Python24\Scripts\trac-admin.py trac\my-project initenv
    106112}}}
    107113
    108 11. Configure Apache (edit httpd.conf)
    109   11.1. [http://www.webdevelopersjournal.com/software/apache_more_config.html Restrict access/lockdown ] as appropriate
     114Follow the interactive prompts to input information about your project.  If you are unsure what to put you can simply press "Enter" to accept the default value.
    110115
    111   11.2. Add Modules to httpd.conf
    112 
    113     11.1.1. Uncomment:
     116'''Subversion users:''' when asked for the "Path to repository" input the folder of the repository you just created:
    114117{{{
    115 LoadModule dav_module modules/mod_dav.so
    116 LoadModule dav_fs_module modules/mod_dav_fs.so
    117 }}}
    118     11.1.2. Add (after):
    119 {{{
    120 # Subversion
    121 LoadModule dav_svn_module modules/mod_dav_svn.so
    122 LoadModule authz_svn_module modules/mod_authz_svn.so
     118Path to repository [/path/to/repos]> c:/Projects/svn/my-project
    123119}}}
    124120
    125     11.1.3. Install Apache as Service (IF NOT WORKING when installed to C:)
     121Note: be sure to include the full path, including the drive letter.
     122
     123== Try it out ==
     124
     125Trac includes a standalone webserver called [wiki:TracStandalone tracd].  You can also use Trac with other webservers, but you should first try tracd to make sure everything's set up and working correctly:
     126
     127From the command line, and in the [Python Install]\Scripts directory:
    126128{{{
    127 C:\Progra~1\Apache~1\Apache2\bin\Apache -k install -n "Apache2"
     129tracd.py -p8000 trac\my-project
    128130}}}
    129131
    130   11.3. Add location root for multiple repositories
    131 {{{
    132 # Subversion
    133 <Location /svn>
    134   DAV svn
    135   # any /svn/foo URL will map to a repository C:/svn/foo
    136   # I've only got it working using SVNPath!!
    137   SVNParentPath C:/svn
    138   AuthType Basic
    139   AuthName "Subversion repository"
    140   AuthUserFile c:/svn/.htaccess
    141   Require valid-user
    142 </Location>
    143 }}}
     132Open your browser to http://localhost:8000 to test out your new Trac project.
    144133
    145   11.4. Add cgi handler, Uncomment:
    146 {{{
    147 AddHandler cgi-script .cgi
    148 }}}
     134Press Ctrl+Break to stop tracd
    149135
    150  
    151 12. Restart Apache.
     136== Troubleshooting ==
    152137
    153     Note: If you get an error message saying that the svn modules are garbled when starting apache via the start menu icons, this is probably due to the version of apache used to compile the modules shipped with subversion (and copied in step 9) being different. The modules shipped with version 1.3.2 of subversion (the latest at the time of writing) need version 2.0 of the server and not 2.2.
     138==== Unsupported version control system "svn" ====
    154139
    155 13. Test your install of Subversion
    156   http://[hostname]:80/svn/repo1
     140The Subversion library is not installed properly.  Be sure you used the "-Z" option with easy_install when [#svnbindings installing] the Subversion bindings.
    157141
    158     Note:  If you are unable to login, and everything seems to work, then try using a repository that Tortoise created.  I burned several hours trying to get this to work until I tried a different repository. -jhopping
     142== What's next? ==
    159143
    160 ----
     144''TODO: intro to advanced setup options''
    161145
    162 === Create Users ===
     146== Comments ==
    163147
    164 14. Add users to password file
    165 {{{
    166 C:\> c:\progra~1\apache~1\apache2\bin\htpasswd -m c:\svn\.htaccess user
    167 }}}
    168 
    169 === Install Trac Prerequisites ===
    170 
    171 (Please note: pay attention to download '''exactly''' the versions mentioned here. Do '''not''' simply download the latest stable versions. Otherwise you will probably run into several issues.)
    172 
    173 15. Install [http://www.python.org/ Python ]
    174 
    175   ''Please use Python 2.3 and not 2.4, because the Subversion bindings for Python (that are a few lines down) currently are only available for 2.3 ([http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91&filter=_py.zip look here for the current status of the bindings])''
    176 
    177   ''If you desperately want it to work with Python 2.4, this trick seems to work.
    178   Install the Subversion bindings for Python 2.3 in the Python 2.4 site-packages directory.
    179   Find all dll files inte the directory \site-packages\libsvn with a name in the form: _*.dll.
    180   Now use your hexeditor of choice and replace all instances of "python23.dll" with "python24.dll" in the dll files (There's just one occurance in each file).''
    181 
    182   ''Beginning with version 1.4, the Subversion team has actually released bindings for Python 2.4. You can download them [http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91 here].''
    183 
    184   [[br]]Add C:\Python23 to the path
    185 
    186 16. Install Subversion Python Bindings
    187   Download [http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91&filter=_py.zip   svn-win32-1.X.X_py.zip] from the Subversion site. [[br]]Extract and copy the libsvn and svn directories to C:\Python23\Lib\site-packages [[br]][[br]]''Note : it is '''very''' important to use the python bindings for the exact version of Subversion you have installed. e.g. when running svn 1.2.3, make sure to use svn-win32-1.2.3_py.zip instead of the zip mentioned above. Otherwise, you '''will''' run into problems (loading dlls etc.)''.
    188 
    189 17. Install [http://docutils.sourceforge.net/ docutils ] (optional)
    190 
    191   This is only required if you want to support Restructured text wiki markup
    192 {{{
    193   expand and run from the expanded docutils-xxx directory
    194   > C:\python23\python setup.py install
    195 }}}
    196 
    197 18. Install SQLite (optional)
    198   http://www.sqlite.org
    199   [[br]]Copy sqlite.exe to C:\Program Files\SQLite
    200 
    201   This is really optional - you only need this if you want to start poking around in the sqlite database because something's gone wrong.
    202 
    203 19. Install PySQLite
    204   http://pysqlite.org/
    205   [[br]]Download and install pysqlite-1.1.6.win32-py2.3.exe
    206 
    207   or pyPgSQL if you are using PostgreSQL
    208   http://pypgsql.sourceforge.net/
    209   [[br]]Download and install pyPgSQL-2.4.win32-py2.3.exe
    210 
    211   NB. Make sure you use v1.x, not 2.x, because the module is renamed from sqlite to pysqlite in v2.x, so the trac installer will fail if you use pysqlite 2.x
    212 
    213   Note: If using XAMPP ([http://www.apachefriends.org/en/xampp-windows.html]) to jumpstart setup you may encounter a problem. XAMPP bundles Python in with their distro and does not update the registry to denote the Python install directory (as I suppose is done during a default install of Python).  This missing registry key prevents the pysqlite-X.X.X.win32-pyX.X.exe installer from running successfully. The install program will state  that it can't find Python installed on your system.  To fix this issue, simply add the following key to the Windows registry.
    214 
    215 {{{
    216 HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.3\InstallPath
    217 }}}
    218 
    219   After creating this key, you should have a "(Default)" string variable which is created automatically. This variable is created with a value of NULL.  Set this variable to the root directory of your Python installation.      For example:
    220 
    221 {{{
    222 C:\Program Files\xampp\python
    223 }}}
    224 
    225   This should allow you to proceed along with the pysqlite installation.
    226 
    227 20. Install ClearSilver
    228   http://www.clearsilver.net download clearsilver_python-0.9.12-win32.zip
    229   [[br]]Copy neo_cgi.pyd into C:\Python23\Lib\site-packages
    230   Alternatively, grab unofficial installers for ClearSilver 0.9.14 from http://clearsilver.yi.org/.
    231 
    232 21. Install eGenix.com mx Extensions for Python (if using PostgreSQL)
    233   Download and install [http://www.egenix.com/files/python/eGenix-mx-Extensions.html].[[br]]
    234   The 'initenv' command in trac-admin needs this library to create the Trac database (At least it did when using a PostgreSQL back end).
    235 
    236 22. Install Trac
    237   http://projects.edgewall.com/trac/wiki/TracDownload
    238 {{{
    239 python ./setup.py install
    240 }}}
    241 
    242 === Fix a few things ===
    243 23. Define how the CGI script is called
    244 
    245   23.1 Copy CGI
    246 {{{
    247 C:\> copy c:\python23\share\trac\cgi-bin\trac.cgi c:\progra~1\apache~1\apache2\cgi-bin
    248 }}}
    249   Use a text editor such as notepad to open trac.cgi and ensure the first line contains the correct path for Apache to find python.
    250 
    251   23.2 Alternatively, define a global Python handler for `CGI` script
    252 
    253   If you often update your Trac installation (following [source:/trunk trunk] development), and do not want to customize the `trac.cgi` file, you may want to define a global handler for `.cgi` scripts, using the `ScriptInterpreterSource` Apache [http://httpd.apache.org/docs/2.0/mod/core.html#scriptinterpretersource directive].
    254 
    255     23.2.1. Add the following line to your Apache configuration file:
    256 {{{
    257 <Directory "/Path/To/Trac/cgi-bin">
    258     ScriptInterpreterSource Registry-Strict
    259 </Directory>
    260 }}}
    261     23.2.2. Add the following key to your Windows registry
    262 {{{
    263 [HKEY_CLASSES_ROOT\.cgi\Shell\ExecCGI\Command]
    264 "@"="c:\\\\Programs\\\\Python\\\\python.exe"
    265 }}}
    266     ''Notes'':
    267       `@` represents the `(Default)` key entry[[BR]]
    268       Do not forget to update the path to your actual Python installation directory
    269 
    270 === Configure Trac DB ===
    271 The 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"}}}
    272 
    273 25. Run trac-admin
    274 {{{
    275 C:\Python23\Scripts> python trac-admin c:/svn/trac.db
    276 }}}
    277 
    278 I found i had to do:
    279 {{{
    280 C:\Python23> python scripts/trac-admin c:/svn/trac.db
    281 }}}
    282 
    283 Note: The latter path is needed if python is not found in the environmental variable PATH.
    284 
    285 26. Initialize DB
    286 {{{
    287 Trac [c:/svn/trac.db]> initenv
    288 }}}
    289 {{{
    290   Enter project name
    291     Project
    292 
    293   Database connection string [sqlite:db/trac.db]>
    294     (Just press enter to accept default)
    295 
    296   Enter path to repository
    297     c:\svn\repo1
    298 
    299   Enter path to templates
    300     c:\Python23\share\trac\templates
    301 }}}
    302 
    303 See TracEnvironment for help with these settings.
    304 
    305 If 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.
    306 
    307 If you are using PostgreSQL and you get an error stating that libpq.dll cannot be found, add the PostgreSQL bin directory to your path (ex: C:\Program Files\PostgreSQL\8.1\bin). 
    308 
    309 If you get an error like "ImportError: No module named svn" you are missing the path to the SVN Python hooks in the PYTHONPATH environment variable.
    310 eg.
    311 {{{
    312 C:\Python23\Scripts>set PYTHONPATH=C:\Python23\Lib\site-packages\svn-win32-1.2.3\python
    313 }}}
    314 ...assuming you installed the hooks for SVN1.2.3.
    315 
    316 To get this step done the right way, you have to understand that the trac database is '''not''' the svn repository.
    317 
    318 For example if you have your svn repository located in c:\svn\repo1 (like supposed by this tutorial), you'll probably want to name your trac database c:\trac\repo1. You would then call "python trac-admin c:/trac/repo1" in your scripts directory and enter "c:\svn\repo1" as the "path to (svn) repository".
    319 
    320 27. Add administrative permissions (the below adds all permissions for 'admin' user)
    321 {{{
    322 Trac [c:/svn/trac.db]>
    323 
    324 permission add admin TRAC_ADMIN
    325 }}}
    326 
    327 === Add Trac to Apache ===
    328 28. Edit httpd.conf:
    329   Add: (copy this - there's a typo in Edgewall's version)
    330   Edit PYTHONPATH to point to your install of SVN bin
    331 {{{
    332 # TRAC
    333 Alias /trac "C:/Python23/share/trac/htdocs"
    334 
    335 <Location /cgi-bin/trac.cgi>
    336   SetEnv TRAC_ENV "c:/svn/trac.db"
    337   SetEnv PYTHONPATH "C:/Program Files/Subversion/bin"
    338   # if you are running Apache as a user other than System, the TMP variable
    339   # needs to be set to a place where that user can write scratch files.  Make
    340   # sure that this directory is created and writable by that user.
    341   # SetEnv TMP "c:/svn/trac.db/tmp
    342 </Location>
    343 
    344 <Location /cgi-bin/trac.cgi/login>
    345   AuthType Basic
    346   AuthName "Project"
    347   AuthUserFile C:/svn/.htaccess
    348   Require valid-user
    349 </Location>
    350 
    351 <Directory "C:/Python23/share/trac/htdocs">
    352   Options Indexes MultiViews
    353   AllowOverride None
    354   Order allow,deny
    355   Allow from all
    356 </Directory>
    357 }}}
    358 
    359   If you want to configure a friendly URL, like http://hostname/trac, the following configuration can be used instead of the appropriate sections above
    360 
    361 {{{
    362 # TRAC
    363 
    364 # Transfer serving up of static content to Apache
    365 Alias /trac/chrome/common "C:/Program Files/Python2.3.5/share/trac/htdocs"
    366 
    367 # Alias for the friendly URL
    368 ScriptAlias /trac "C:/Program Files/Python2.3.5/share/trac/cgi-bin/trac.cgi"
    369 <Location "/trac">
    370   SetEnv TRAC_ENV "c:/svn/trac.db"
    371   SetEnv PYTHONPATH "C:/Program Files/Subversion/bin"
    372   # if you are running Apache as a user other than System, the TMP variable
    373   # needs to be set to a place where that user can write scratch files.  Make
    374   # sure that this directory is created and writable by that user.
    375   # SetEnv TMP "c:/svn/trac.db/tmp
    376 </Location>
    377 
    378 <Location "/trac/login">
    379   AuthType Basic
    380   AuthName "trac"
    381   AuthUserFile C:/svn/.htaccess
    382   Require valid-user
    383 </Location>
    384 }}}
    385 
    386   Note: if you get an error "Authentication information not available." after clicking "login", refer to #2258
    387 
    388   Alternatively you could set up the authorization 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.
    389 {{{
    390 <Location /cgi-bin/trac.cgi/login>
    391   #NT Domain auth config
    392   AuthType SSPI
    393   SSPIAuth On
    394   SSPIAuthoritative On
    395   SSPIOfferBasic On
    396   SSPIOmitDomain Off
    397   # following line squishes bug #1168 if IE has troubles editing wiki pages.   
    398   SSPIBasicPreferred On
    399   AuthName "Project"
    400   Require valid-user
    401 </Location>
    402 }}}
    403 
    404   You'll also need the sspi_auth_module on your system and loaded like this...
    405 {{{
    406 LoadModule sspi_auth_module modules/mod_auth_sspi.so
    407 }}}
    408 You must download and install this module. It can be found here:
    409 http://mod-auth-sspi.sf.net/
    410 
    411  Or compile it into Apache. Note when adding permissions and authenticating against a domain you may need to use the following syntax complete with quotes as seen in #1055. 
    412  * permission add "DOMAIN\username" TRAC_ADMIN
    413 
    414  ''Note'': Internet Explorer may be in trouble with an Apache server running SSPI authentication. See #1343
    415 
    416  With example above, you must specify user name like "DOMAIN\username"
    417  If you hate "DOMAIN\username" format, {{{SSPIOmitDomain}}} option is usefull. Set it ON!
    418 {{{
    419   SSPIOmitDomain On
    420 }}}
    421  
    422  If this option is ON, the mod_auth_sspi passes authentication name to an Apache server without a domain part.
    423  As result, you can manage user names with simply 'username' instead of 'DOMAIN\username'
    424  in apache password file and {{{trac-admin}}} command, and also, it is used by Trac for reporter name, author and so on.
    425 
    426  * permission add username TRAC_ADMIN
    427  
    428  But remember that you must specify "DOMAIN\username" format on authentication dialog although this option is ON.
    429 
    430  ''Note'': Older version of mod_auth_sspi (like http://tortoisesvn.tigris.org/mod_auth_sspi.zip) doesn't
    431  support {{{SSPIOmitDomain}}} and has bug for basic authentication. 1.0.2 introduced above is recommended.
    432 
    433 
    434 29. Restart Apache.
    435 
    436 30. Hold your breath, test Trac install
    437   http://[hostname]:80/cgi-bin/trac.cgi
    438 
    439   If it doesn't work, then running Apache from the command-line will give you a few clues.
    440 
    441   If your page seems to be lacking stylesheets, please check the alias of '''/trac''' in apache. Otherwise you've probably run into a known Apache bug described (and worked around) [http://www.apache.org/dist/httpd/binaries/win32/#xpbug here].
    442 
    443   It is possible you have to add Full NTFS file permissions to user NT Authority\System on Trac folder, otherwise you could get an error.
    444 
    445 === Optional Enscript ===
    446 31. In order for Trac to syntax highlight code, you must download and install [http://gnuwin32.sourceforge.net/packages.html Enscript].  After installing Enscript, you will need to add the path to the enscript executable to the Windows PATH environment variable.  '''Note:''' If Apache is running as a service you will need to reboot the machine for it to receive the updated PATH setting.
    447 
    448 === Optional pre- and post-commit hooks for Subversion ===
    449 32. In order to use pre- and post-commit hooks with Subversion on Windows, please refer to the files described in #1602, as the these files are not commited into the trunk as of version 0.9-dev.
    450 
    451 The files you need are "pre-commit.2.bat", "post-commit.2.bat", "trac-pre-commit-hook_4bat.2" and "trac-post-commit-hook_4bat.2". The pre-commit hook makes it a requirement to reference a ticket before commiting the changes.
    452 
    453 Place the desired ".bat" and "trac-" files in your Subversion repository "hooks" directory and configure the ".bat" file for your system (remove the ".2" from the filenames ofcourse). For more information on hooks, read the [http://svnbook.red-bean.com/nightly/en/svn.reposadmin.create.html#svn.reposadmin.create.hooks Hook Scripts] section of the Subversion book.
    454 
    455 === Finally... ===
    456 33. Install Subversion clients as necessary (try [http://rapidsvn.tigris.org RapidSVN] , [http://tortoisesvn.tigris.org/ TortoiseSVN] or [http://subclipse.tigris.org/ Subclipse])
    457 
    458 34. Don't forget to lock down the security on the box!
    459 
    460 35. If the svn page would not work properly with saying that DLL is missing, FIRST try to reboot the system and if that does not work, copy the three DLL's - libdb42.dll - libeay32.dll - ssleay32.dll from your [Subversion]\bin directory to your system directory (most likely C:\Windows\system32).
    461 
    462 == Upgrading from Trac 0.84 to 0.9-beta1 on Windows ==
    463 
    464 This section builds off the [wiki:TracUpgrade generic Trac upgrade instructions], so you may want to keep that open to use as supplementary reading material.
    465 
    466 1. Download Windows Installer file
    467 
    468 2. Backup old version of Trac:
    469 {{{
    470 > move C:\Python23\Lib\site-packages\trac C:\Python23\Lib\site-packages\trac-0.8.4
    471 
    472 > move C:\Python23\share\trac C:\Python23\share\trac-0.8.4
    473 > move C:\Program Files\Apache Group\Apache2\cgi-bin\trac.cgi C:\Program Files\Apache Group\Apache2\cgi-bin\trac-0.8.4.cgi
    474 > xcopy /x /e /i C:\svn\trac.db C:\svn\trac-0.8.4.db\
    475 }}}
    476 
    477 3. Run the Trac Windows Installer
    478 
    479 4. Run these commands
    480 {{{
    481 > cd C:\Python23\Scripts
    482 > python trac-admin C:\svn\trac.db upgrade
    483 > python trac-admin C:\svn\trac.db wiki upgrade
    484 }}}
    485 
    486 5. If using CGI, copy trac.cgi to Apache directory.
    487 
    488 {{{
    489 > copy C:\Python23\share\trac\cgi-bin\trac.cgi C:\Program Files\Apache Group\Apache2\cgi-bin\trac.cgi
    490 }}}
    491 
    492 6. Open and edit C:\Program Files\Apache Group\Apache2\cgi-bin\trac.cgi. Change the first line from:
    493 {{{
    494 
    495 #!C:\Programme\Python23\python.exe
    496 }}}
    497 to
    498 {{{
    499 
    500 #!C:\Python23\python.exe
    501 }}}
    502 
    503 7. Point your web browser to the Trac site. That should be it!
    504 ----
    505 === Contributors: ===
    506 
    507  * [mailto:Daragh|at|i2i-Tech.com Daragh Fitzpatrick]
    508  * [mailto:alexkw|at|mac.com Alex Wolfe]
    509  * [mailto:tim|at|igethalf.com Tim Browse]
    510  * [mailto:sid|at|seegrid.com Sid Wiesner]
    511  * [mailto:trac-svn-mail|at|elvendesigns.com Muir]
    512  * [mailto:abudhu|at|gmail.com Amit Budhu]
    513  * [mailto:denney|at|mantrasoftware.net Rodney Beck]
    514  * [mailto:javinievas|at|gmail.com Javier Nievas]
    515 
    516 === DLL Errors ===
    517 After a fresh install, trying to access either the Timeline or Browse Source tabs results in an internal error:
    518 {{{
    519 Traceback (most recent call last):
    520 
    521     File "C:\Local\Python23\Lib\site-packages\trac\core.py", line 531, in cgi_start
    522         real_cgi_start()
    523     File "C:\Local\Python23\Lib\site-packages\trac\core.py", line 526, in real_cgi_start
    524         dispatch_request(path_info, args, req, env)
    525     File "C:\Local\Python23\Lib\site-packages\trac\core.py", line 439, in dispatch_request
    526         module = module_factory(args, env, database, req)
    527     File "C:\Local\Python23\Lib\site-packages\trac\core.py", line 172, in module_factory
    528         import sync
    529     File "C:\Local\Python23\Lib\site-packages\trac\sync.py", line 22, in ?
    530         from svn import fs, util, delta, repos, core
    531     File "C:\Local\Python23\lib\svn\fs.py", line 28, in ?
    532         import libsvn.fs
    533     File "C:\Local\Python23\lib\libsvn\fs.py", line 4, in ?
    534         import _fs ImportError?: DLL load failed: The specified module could not be found.
    535 }}}
    536 
    537 An easy solution would be to copy dlls at svn\bin\*.dll to cgi-bin directory. then it works well. Before copying any DLLs, first try to reboot the system. In most cases, the internal system error problem disappear after a simple system reboot.
    538 
    539 ==== Guía en Español ====
    540 
    541 Guía de instalación de Trac en Windows en Español. [http://traclog.blogspot.com/ Aquí.]
    542 Some help for Spanish speakers installing Trac for Windows.
    543 
    544 ----
    545 See also:  TracInstall, TracOnWindowsStandalone
    546 
    547 === Comments ===
    548 
    549 ==== Really Wonderful ====
    550 
    551 This is one of the best docs on how install a system. Thank you very much.
    552 The only thing I don't understand is what should I do "to lock down the security on the box". Excuse me, I'm a begineer in this things, Could somebody explain a little bit? Thanks, a lot!
    553 
    554 ==== This badly needs a distro ====
    555 
    556 The large number of components to download and long list of installation steps puts me off bothering to install Trac.
    557 I love Trac and use it at work but I just don't have the time/patience to work through all these steps.
    558 What's obviously needed is a single distro with everything preconfigured and tested for Win32/Mac/Linux.
    559 I think this would also reduce the inevitable support requests from such as complex install.
    560 I think the ideal might be a Trac installation addon for each [http://www.apachefriends.org/en/xampp.html XAMPP] distro.
    561 
    562 ==== I agree ====
    563 I agree, this needs a distro. I would be willing to help if such a thing were started. [http://www.RicharddeCosta.com]
    564 
    565 ==== New Python Bindings ====
    566 
    567 New python bindings and isntallers have been made for 2.4 python and newer subversion releases [http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91 here] for instance. Also with SVNPath in the httpd.conf if your full path has spaces you may want to put it in double quotes.
     148  * Hopefully this 0.10 rewrite can include upgrade instructions for 0.9.6 users. That would be immensely comforting. Thanks for your excellent work...
     149  * Clarification added for subversion install (figured out on own - then saw a helpful post).  May add some notes here about the Trac Admin setup as well.  Of course if my editing isn't seen as a clarification - you can and will reverse it.