Edgewall Software

Changes between Version 282 and Version 283 of TracOnWindows


Ignore:
Timestamp:
Aug 21, 2009, 8:07:00 AM (15 years ago)
Author:
trac@…
Comment:

Vastly improved instructions, verified they worked by performing them at the time of writing; and removed non-trac content - e.g. using httpcfg to configure IIS port 80 behaviour.

Legend:

Unmodified
Added
Removed
Modified
  • TracOnWindows

    v282 v283  
    66The instructions for Trac 0.10 can be found at the ["0.10/TracOnWindows"] page.
    77
    8 The installer instructions are incomplete, and do not provide a working solution. Follow the manual installation instructions.
    98}}}
    109
    1110= Trac On Windows =
     11''Last modified: 2009-08-21 00:00:21''
     12
     13The following instructions use 32-bit software packages. The 64-bit software packages do not yet integrate seamlessly with each other, so are not recommended.
    1214[[PageOutline(2-3)]]
    13 The installation of Trac on Windows is now much simpler, due to the dropping of ClearSilver as the primary template engine in favor of Genshi (Clearsilver is still optionally supported in case you need to use a plugin that requires it).
     15== 1. Install Python ==
     16Although Python 2.5.x is not the latest version of Python available, it is the latest version supported by all the software components needed to run Trac.
     17 1. Download [http://www.python.org/ftp/python/2.5.4/python-2.5.4.msi Python-2.5.4.msi] to your computer, and run it (double-click on ''python-2.5.4.msi'' in your download folder).
     18 1. Click the '''__R__un''' button in the ''Open File - Security Warning'' dialogue box, if it appears.
     19 1. Click the '''Next >''' button to ''Install for all users''
     20 1. Click the '''Next >''' button to use ''C:\Python25'' as the destination directory
     21 1. Click the '''Next >''' button to install all of the Python components
     22 1. Wait for the installation to complete, and then click the '''Finish''' button
     23 1. Add the install directory (default is '''C:\Python25'''), and '''C:\Python25\Scripts''' directory to the windows '''%PATH%''' environment variable:
     24  a. Click the Windows '''Start''' button
     25  a. Right-click the '''My Computer''' icon
     26  a. Click the '''P__r__operties''' option at the bottom of the pop-up menu
     27  a. Click the '''Advanced''' tab
     28  a. Click the '''Enviro__n__ment Variables''' button
     29  a. Scroll down the ''__S__ystem variables'' listbox to the '''Path''' ''Variable''
     30  a. Select the '''Path''' ''Variable'' and click the ''Ed__i__t'' button below it - DO NOT click on the edit button above
     31  a. Scroll to the right-hand end of the ''Variable __v__alue'' field, and type ''';C:\Python25;C:\Python25\Scripts'''
     32  a. Click the '''OK''' button in the ''Edit System Variable'' window
     33  a. Click the '''OK''' button in the ''Environment Variables'' window
     34  a. Click the '''OK''' button in the ''System Properties'' window
    1435
    15 If furthermore you don't need to interface with Subversion, then all you need besides are a few Python packages.  It doesn't hurt to have an `svn` client at hand for checking out the latest "trunk" version of some packages, like Trac itself or Genshi.
     36== 2. Setuptools ==
     37 1. Download [http://peak.telecommunity.com/dist/ez_setup.py ez_setup.py] from [http://peak.telecommunity.com/DevCenter/setuptools PEAK] (Python Enterprise Application Kit) to your Python (default is '''C:\Python25''') directory.
     38 1. Open a command window
     39  a. Click the Windows '''Start''' button
     40  a. Click '''__R__un'''[[BR]]A dialogue box titled ''Run'' should appear
     41  a. Type '''cmd''' in to the ''__O__pen'' drop-down field, and click the '''OK''' button[[BR]]A black window should appear
     42 1. Type '''cd C:\Python25''' and press the ''Return'' key
     43 1. Type '''ez_setup.py''' and press the ''Return'' key[[BR]]Verify no messages containing errors appeared
    1644
    17 == Installing Python on Windows ==
     45== 3. Subversion (optional) ==
    1846
    19 Installation package for Python adds it to App Paths, so that Python executable could be run from any directory in the command line. In most cases you don't need to add Python to PATH manually.
     47Trac can integrate with [http://subversion.tigris.org Subversion] version control software. Read more about the integration between Trac and Subversion from the wiki: TracSubversion.
    2048
    21 === Python 2.5 ===
     49=== Subversion Server & Client ===
     50 1. Download [http://subversion.tigris.org/files/documents/15/46485/Setup-Subversion-1.6.4.msi Setup-Subversion-1.6.4.msi] to your computer, and run it (double-click on ''Setup-Subversion-1.6.4.msi'' in your download folder).
     51 1. Click the '''__R__un''' button in the ''Open File - Security Warning'' dialogue box, if it appears.
     52 1. Click the '''__N__ext''' button on the ''Welcome to the Subversion Setup Wizard'' screen
     53 1. Click the '''__N__ext''' button on the ''Information'' screen
     54 1. Click the '''__N__ext''' button to select ''Binding for Apache 2.0.x''
     55 1. Type '''C:\Subversion\''' in to the ''Install subversion to:'' field, and click the '''__N__ext''' button
     56 1. Click the '''Finish''' button
     57 1. Open a command window
     58  a. Click the Windows '''Start''' button
     59  a. Click '''__R__un'''[[BR]]A dialogue box titled ''Run'' should appear
     60  a. Type '''cmd''' in to the ''__O__pen'' drop-down field, and click the '''OK''' button[[BR]]A black window should appear
     61 1. Type '''cd C:\Subversion\bin''' and press the ''Return'' key
     62 1. Type '''mkdir C:\svnrepositories''' and press the ''Return'' key
     63 1. Type '''svnadmin create C:\svnrepositories\myproject''' and press the ''Return'' key
     64 1. Type '''sc create svnserver binpath= "C:\Subversion\bin\svnserve.exe --service -r c:\svnrepositories" displayname= "Subversion Server (svnserver)" depend= Tcpip start= auto''' and press the ''Return'' key
     65 1. Type '''net start svnserver''' and press the ''Return'' key
    2266
    23 Although Trac runs on Python 2.4 it is better to get more recent stable Python version if you don't have any installed.
     67=== Subversion Bindings ===
     68 1. Open a command window
     69  a. Click the Windows '''Start''' button
     70  a. Click '''__R__un'''[[BR]]A dialogue box titled ''Run'' should appear
     71  a. Type '''cmd''' in to the ''__O__pen'' drop-down field, and click the '''OK''' button[[BR]]A black window should appear
     72 1. Type '''cd C:\Python25\Scripts''' and press the ''Return'' key
     73 1. Type '''easy_install -Z !http://subversion.tigris.org/files/documents/15/46482/svn-python-1.6.4.win32-py2.5.exe''' and press the ''Return'' key[[BR]]Verify no messages containing errors appeared
    2474
    25 Simply [http://www.python.org/download/releases/2.5.4/ download] and install the appropriate .msi for your Python platform:
    26  - [http://www.python.org/ftp/python/2.5.4/python-2.5.4.msi Python-2.5.4.msi]
    27  - [http://www.python.org/ftp/python/2.5.4/python-2.5.4.amd64.msi Python-2.5.4.amd64.msi]
    28  - [http://www.python.org/ftp/python/2.5.4/python-2.5.4.ia64.msi Python-2.5.4.ia64.msi]
     75== 4. mod_python (optional) ==
     76mod_python is needed if you want to use Apache HTTP server.
     77 1. Open a command window
     78  a. Click the Windows '''Start''' button
     79  a. Click '''__R__un'''[[BR]]A dialogue box titled ''Run'' should appear
     80  a. Type '''cmd''' in to the ''__O__pen'' drop-down field, and click the '''OK''' button[[BR]]A black window should appear
     81 1. Type '''cd C:\Python25\Scripts''' and press the ''Return'' key
     82 1. Type '''easy_install -Z !http://www.apache.org/dist/httpd/modpython/win/3.3.1/mod_python-3.3.1.win32-py2.5-Apache2.0.exe''' and press the ''Return'' key[[BR]]Verify no messages containing errors appeared
    2983
    30 ''Notes regarding 64 bit Python:''
    31   * SetupTools does not yet provide an install that works with 64-bit Python, it's nevertheless possible to use the easy-install-script.py (see http://bugs.python.org/setuptools/issue2).
    32   * ''The Subversion project does not provide amd64 or ia64 setup executables, so if you want to use Subversion integration, you'll need to either compile the bindings yourself, or use the x86 version of Python.''
    33   * It's generally hard to find pre-compiled extensions, so you most often have to compile them yourself (e.g. for Genshi, Mercurial, the bindings for the DB backends).
    34 That being said, it's perfectly possible to run Trac for Windows/x64 (XP or Vista).
     84== 5. Plug-ins (optional) ==
     85See TracPlugins for details about plugin installation.
     86For example: to install the SpamFilter plugin
     87 1. Open a command window
     88  a. Click the Windows '''Start''' button
     89  a. Click '''__R__un'''[[BR]]A dialogue box titled ''Run'' should appear
     90  a. Type '''cmd''' in to the ''__O__pen'' drop-down field, and click the '''OK''' button[[BR]]A black window should appear
     91 1. Type '''mkdir C:\src''' and press the ''Return'' key
     92 1. Type '''cd C:\src''' and press the ''Return'' key
     93 1. Type '''svn checkout !http://svn.edgewall.org/repos/trac/sandbox/spam-filter/trunk spam-filter''' and press the ''Return'' key[[BR]]Verify no messages containing errors appeared
     94 1. Type '''cd spam-filter''' and press the ''Return'' key
     95 1. Type '''python setup.py install''' and press the ''Return'' key[[BR]]Verify no messages containing errors appeared
    3596
    36 === Python 2.6 ===
     97== 6. Genshi ==
     98 1. Open a command window
     99  a. Click the Windows '''Start''' button
     100  a. Click '''__R__un'''[[BR]]A dialogue box titled ''Run'' should appear
     101  a. Type '''cmd''' in to the ''__O__pen'' drop-down field, and click the '''OK''' button[[BR]]A black window should appear
     102 1. Type '''mkdir C:\src''' and press the ''Return'' key
     103 1. Type '''cd C:\src''' and press the ''Return'' key
     104 1. Type '''svn checkout !http://svn.edgewall.org/repos/genshi/trunk genshi''' and press the ''Return'' key
     105 1. Type '''cd genshi''' and press the ''Return'' key
     106 1. Type '''python setup.py install''' and press the ''Return'' key[[BR]]Verify no messages containing errors appeared
    37107
    38 [http://python.org/ftp/python/2.6.1/python-2.6.1.msi Python-2.6.1.msi]
     108== 7. Trac ==
     109 1. Open a command window
     110  a. Click the Windows '''Start''' button
     111  a. Click '''__R__un'''[[BR]]A dialogue box titled ''Run'' should appear
     112  a. Type '''cmd''' in to the ''__O__pen'' drop-down field, and click the '''OK''' button[[BR]]A black window should appear
     113#!1.Type '''cd C:\Python25\Scripts''' and press the ''Return'' key
     114#!1.Type '''easy_install Trac''' and press the ''Return'' key[[BR]]Verify no messages containing errors appeared
     115 1. Type '''mkdir C:\src''' and press the ''Return'' key
     116 1. Type '''cd C:\src''' and press the ''Return'' key
     117 1. Type '''svn checkout !http://svn.edgewall.org/repos/trac/trunk trac''' and press the ''Return'' key[[BR]]Verify no messages containing errors appeared
     118 1. Type '''cd trac''' and press the ''Return'' key
     119 1. Type '''python setup.py install''' and press the ''Return'' key[[BR]]Verify no messages containing errors appeared
     120 1. Type '''mkdir C:\trac''' and press the ''Return'' key
     121 1. Type '''cd C:\Python25\Scripts''' and press the ''Return'' key
     122 1. Type '''trac-admin \trac initenv''' and press the ''Return'' key
     123 1. Type in your project name (keep it succinct) and press the ''Return'' key
     124 1. Press the '''Return''' key to select the default ''Database connection string''
     125 1. Press the '''Return''' key to select ''svn'' as the default ''Repository type''
     126 1. Type in the full path of your repository; e.g. ''/svnrepositories/myproject'', and press the '''Return''' key
     127 1. Verify the installation of Trac works:
     128  a. Type in '''tracd --port 8000 C:\trac''' to start the Trac daemon
     129  a. Click the Windows '''Start''' button
     130  a. Click '''__R__un'''[[BR]]A dialogue box titled ''Run'' should appear
     131  a. Type '''!http://localhost:8000''' [[BR]]A browser window should open to a page with ''Available Projects''
     132  a. Click on your project's name, and you should be taken to your project's Trac home page.
    39133
     134== 8. Account Manager Plug-in ==
     135 1. Open a command window
     136  a. Click the Windows '''Start''' button
     137  a. Click '''__R__un'''[[BR]]A dialogue box titled ''Run'' should appear
     138  a. Type '''cmd''' in to the ''__O__pen'' drop-down field, and click the '''OK''' button[[BR]]A black window should appear
     139 1. Type '''cd C:\Python25\Scripts''' and press the ''Return'' key
     140 1. Type '''easy_install !http://trac-hacks.org/svn/accountmanagerplugin/trunk''' and press the ''Return'' key[[BR]]Verify no messages containing errors appeared
     141 1. Type '''trac-admin C:\trac permission add anonymous TRAC_ADMIN''' and press the ''Return'' key
     142 1. Click the Windows '''Start''' button
     143 1. Click '''__R__un'''[[BR]]A dialogue box titled ''Run'' should appear
     144 1. Type '''notepad C:\trac\conf\trac.ini''' in to the ''__O__pen'' drop-down field, and click the '''OK''' button
     145 1. Copy the block of text below
     146{{{
     147[components]
     148acct_mgr.admin.accountmanageradminpage = enabled
     149acct_mgr.api.accountmanager = enabled
     150acct_mgr.db.sessionstore = enabled
     151acct_mgr.htfile.htdigeststore = enabled
     152acct_mgr.pwhash.htdigesthashmethod = enabled
     153acct_mgr.web_ui.accountmodule = enabled
     154acct_mgr.web_ui.loginmodule = enabled
     155acct_mgr.web_ui.registrationmodule = enabled
     156trac.web.auth.loginmodule = disabled
     157}}}
     158 1. Scroll down to the ''[header_logo]'' section, and place the cursor on the blank line above it
     159 1. Paste the text you copied above in to the document
     160 1. Save the file, and close notepad
     161 1. Create an empty '''C:\trac\conf\passwords.txt'''
     162  a. Click the Windows '''Start''' button
     163  a. Click '''__R__un'''[[BR]]A dialogue box titled ''Run'' should appear
     164  a. Type '''notepad C:\trac\conf\passwords.txt''' in to the ''__O__pen'' drop-down field, and click the '''OK''' button
     165  a. Save the file, and close notepad
     166 1. Click the Windows '''Start''' button
     167 1. Click '''__R__un'''[[BR]]A dialogue box titled ''Run'' should appear
     168 1. Type '''!http://localhost:8000/trac/admin''' [[BR]]A browser window should open to an ''Administration'' page
     169 1. Click the '''Configuration''' hyperlink under ''Accounts'' in the menu on the left-hand side of the page
     170 1. Select '''1''' from the drop-down list-box next to the ''!HtDigestStore'' heading
     171 1. Select '''1''' from the drop-down list-box next to the ''!SessionStore'' heading
     172 1. Type '''C:\trac\conf\passwords.txt''' in to the ''filename:'' field in the ''!HtDigestStore'' section
     173 1. Type '''trac''' in to the ''realm:'' field under the ''!HtDigestStore'' section
     174 1. Click the '''Save''' button
     175 1. Click the '''Users''' hyperlink under the ''Accounts'' section in the menu on the left-hand side of the page
     176 1. Type a username in to the ''Username:'' field on the right-hand side of the page in the ''Add Account:'' section
     177 1. Type a password in to the ''Password:'' field on the right-hand side of the page in the ''Add Account:'' section
     178 1. Type the password in to the ''Confirm password:'' field on the right-hand side of the page in the ''Add Account:'' section
     179 1. Type a name in to the ''Name:'' field on the right-hand side of the page in the ''Add Account:'' section
     180 1. Type an e-mail address in to the ''Email:'' field on the right-hand side of the page in the ''Add Account:'' section
     181 1. Click the '''Add''' button
     182 1. Click the '''Permissions''' hyperlink under the ''General'' section in the menu on the left-hand side of the page
     183 1. Check '''TRAC_ADMIN''' in the ''Action'' section in the center of the page
     184 1. Click the '''Remove selected items''' button
     185 1. Type the username in to the ''Subject:'' field on the right-hand side of the page in the ''Grant Permissions:'' section
     186 1. Select '''TRAC_ADMIN''' from the ''Action:'' drop-down list-box
     187 1. Click the '''Add''' button
    40188
    41 
    42 == Method 1: Using Installers == #using-installers
    43 
    44 You need to download and install the following packages, pick the link appropriate to your Python version:
    45 || '''Mandatory Packages''' || '''Installers''' ||
    46 || '''SetupTools''' || setuptools-0.6c7.win32-py2.''X''.exe ([http://pypi.python.org/packages/2.5/s/setuptools/setuptools-0.6c7.win32-py2.5.exe#md5=395a81d709766f3a0d6084964cb98b5a 2.5], [http://pypi.python.org/packages/2.4/s/setuptools/setuptools-0.6c7.win32-py2.4.exe#md5=8109dbab4d86a24e8b5ef1881c9fcbb1 2.4], [http://pypi.python.org/packages/2.3/s/setuptools/setuptools-0.6c7.win32-py2.3.exe#md5=6bd6f02383edc580a311a070e8d360f5 2.3]) (check [http://pypi.python.org/pypi/setuptools here] for latest) [[BR]] As yet there's no installer for Python 2.6.  Use the [TracOnWindows#Setuptools manual method] below. ||
    47 
    48 || '''[genshi:milestone:0.5 Genshi 0.5]''' || Genshi-0.5.win32-py2.''X''.exe ([http://ftp.edgewall.com/pub/genshi/Genshi-0.5.win32-py2.5.exe 2.5], [http://ftp.edgewall.com/pub/genshi/Genshi-0.5.win32-py2.4.exe 2.4], [http://ftp.edgewall.com/pub/genshi/Genshi-0.5.win32-py2.3.exe 2.3]) [[BR]] Genshi-0.5.1.win32-py2.''X''.exe ([http://ftp.edgewall.com/pub/genshi/Genshi-0.5.1.win32-py2.5.exe 2.5], [http://ftp.edgewall.com/pub/genshi/Genshi-0.5.1.win32-py2.4.exe 2.4], [http://ftp.edgewall.com/pub/genshi/Genshi-0.5.1.win32-py2.3.exe 2.3]) (check [http://genshi.edgewall.org/wiki/Download here] for latest) ||
    49 
    50 || '''[milestone:0.11 Trac 0.11]''' || [http://ftp.edgewall.com/pub/trac/Trac-0.11.win32.exe Trac-0.11.win32.exe] (works for Python 2.3, 2.4 and 2.5) [[BR]] [http://ftp.edgewall.com/pub/trac/Trac-0.11.2.1.win32.exe Trac-0.11.2.1.win32.exe] (check [http://trac.edgewall.org/wiki/TracDownload here] for latest) ||
    51 
    52 [[BR]]
    53 
    54 || ''Optional Packages'' || ''Installers'' || ''^(see notes below)^'' ||
    55 || ''PySqlite'' || pysqlite-2.4.0.win32-py2.''X''.exe ([http://initd.org/pub/software/pysqlite/releases/2.4/2.4.0/pysqlite-2.4.0.win32-py2.5.exe 2.5], [http://initd.org/pub/software/pysqlite/releases/2.4/2.4.0/pysqlite-2.4.0.win32-py2.4.exe 2.4], [http://initd.org/pub/software/pysqlite/releases/2.4/2.4.0/pysqlite-2.4.0.win32-py2.3.exe 2.3]) || ^(1)^ ||
    56 || ''[TracSubversion Subversion]'' || svn-python-1.4.6.win32-py2.''X''.exe - ([http://subversion.tigris.org/files/documents/15/41086/svn-python-1.4.6.win32-py2.5.exe 2.5], [http://subversion.tigris.org/files/documents/15/41085/svn-python-1.4.6.win32-py2.4.exe 2.4], [http://subversion.tigris.org/files/documents/15/41084/svn-python-1.4.6.win32-py2.3.exe 2.3]) || ^(2)^ ||
    57 || ||[http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=8100&expandFolder=8100&folderID=8100 svn-python-1.6.1.win32-py2.X.exe] - ([http://subversion.tigris.org/files/documents/15/45607/svn-python-1.6.1.win32-py2.5.exe 2.5])|| ||
    58 || ''ClearSilver'' || clearsilver-0.9.14.win32-py2.''X''.exe - ([http://knowlog.blogspot.com/2007/04/clearsilver-0104-with-python-25-win32.html 2.5], [http://www.clearsilver.net/downloads/win32/clearsilver-0.9.14.win32-py2.4.exe  2.4], [http://www.clearsilver.net/downloads/win32/clearsilver-0.9.14.win32-py2.3.exe 2.3]) || ^(3)^ ||
    59 
    60 '''Notes:'''
    61  1. ''Pysqlite''
    62    - If you're using Python 2.5, Trac is able to use the built-in sqlite3 module (same as Pysqlite 2.3.2), so you don't necessarily need to install that package.
    63    - If you plan to use another database than SQLite, installing Pysqlite is of course not needed.
    64      See the TracOnWindows/Advanced instructions for other options.
    65 ====  ==== #svnbindings_installers
    66  2. ''Subversion''
    67    - You don't necessarily need Subversion. You can use Trac with other [VersioningSystemBackend versioning system backends] or none at all.
    68    - [http://www.visualsvn.com VisualSVN] is an easy solution for Windows users who want to use Subversion integration.
    69    - If you need Subversion, the above links should be fine, '''unless''' you need to use Trac within Apache 2.2. In that case you need [http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=8100&expandFolder=8100&folderID=91 Apache 2.2 compatible binaries]. But beware, this is a tricky install, as it seems that there exist various incompatibilities between the various released binaries (in particular, see ticket:6739#comment:9).
    70    - Try [http://subversion.tigris.org/files/documents/15/43470/svn-python-1.5.2.win32-py2.5.exe svn-python-1.5.2.win32-py2.5.exe] if you have Subversion 1.5 and see the error like "Expected FS format '2'; found format '3'", 160043
    71 
    72  3. ''Clearsilver'' You only need Clearsilver if you're using a plugin that was not yet ported to Genshi.
    73 
    74 
    75 == Method 2: Manual Installation ==
    76 
    77 This method is about using `easy_install` (from Setuptools) at the command line.
    78 Ideally, once everything will have settle down, this will be a matter of doing `easy_install Trac`.
    79 ~~Don't try that yet, though, rather go through the following steps.~~ Seems to be working for Trac and Genshi...
    80 
    81 === Windows command line ===
    82 
    83 You'll need to open a Windows command line to install some of the necessary software:
    84 
    85  1. Click "Start" > "Run..." (or press Win+R)
    86  1. Type "cmd" and click "Ok" - this opens the Windows command console
    87  1. Type "cd c:\Python26" (''substitute your python folder'')
    88 
    89 ''Tip: On Vista, hold shift key, right click on desired folder, and choose 'Open Command Window Here'.  You can do the same in Windows XP with !PowerToys installed.''
    90 
    91 === Setuptools ===
    92 
    93 [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].
    94 
    95 Download the setuptools installer: [http://peak.telecommunity.com/dist/ez_setup.py ez_setup.py]
    96 
    97 When the download completes double-click the "ez_setup.py" file from your download folder to install setuptools.
    98 
    99 ''That didn't work for me.  I found this method on [http://stackoverflow.com/questions/309412/how-to-setup-setuptools-for-python-2-6-on-windows StackOverflow]:''
    100  * Download [http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c9.tar.gz#md5=3864c01d9c719c8924c455714492295e setuptools-0.6c9.tar.gz] and unzip to a folder outside your Python install.
    101  * Download [http://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c9-py2.6.egg#md5=ca37b1ff16fa2ede6e19383e7b59245a setuptools-0.6c9-py2.6.egg] to the same folder
    102  * execute the following command at a command prompt in the same folder.
    103 {{{
    104 python ez_setup.py setuptools-0.6c9-py2.6.egg
    105 }}}
    106 
    107 Now change to the new scripts directory in your command prompt (''substitute your python folder''):
    108 {{{
    109 cd \Python26\scripts
    110 }}}
    111 You should now be in the folder "C:\Python26\Scripts" where you can run the "easy_install" command to install the remaining software.
    112 
    113 At this point you should be able to type
    114 {{{
    115 easy_install Trac
    116 }}}
    117 to install both the latest Trac and Genshi releases.
    118 
    119 === Installing Genshi ===
    120 
    121 [http://genshi.edgewall.org/wiki/Download#Zippackage Download] the zip package:
    122  - [http://ftp.edgewall.com/pub/genshi/Genshi-0.5.1.zip Genshi-0.5.1.zip]
    123 
    124 Unzip to a folder and then from that folder run `python setup.py install` in a command window. (Make sure you have added the Python install path (e.g. C:\Program Files\Python25) to your system PATH variable. You can do this by right clicking on My Computer, clicking on Properties, selecting the Advanced tab, clicking the Environment Variables button, scrolling down the second list window until you see the 'Path' variable, then editing the string to add the Python install path. Then start command line for Genshi installation.)
    125 
    126 
    127 === Install PySQLite ===
    128 
    129 ''Obsolete: the Trac install includes SQLite''
    130 
    131 Install the [http://pysqlite.org PySqlite] database driver:
    132 {{{
    133 easy_install pysqlite
    134 }}}
    135 
    136 If you want to use another database than SQLite, you need to read the TracOnWindows/Advanced instructions.
    137 
    138 Note: When installing PySQLite this way, you may see the following error:
    139 
    140 >Error: Setup script exited with error: Python was built with version 7.1
    141 >of Visual Studio, and extensions need to be built with the same version
    142 >of the compiler, but it isn't installed.
    143 
    144 If so, try installing PySQLite with the Windows executable installer referenced in the [#using-installers Method 1] above.
    145 
    146 When it has finished downloading, double-click on it to run the installer.
    147 On the first window of the installation dialog, click Next to begin the installation process.
    148 
    149 On the second window, confirm the Python install directory. If you have followed the instructions above, it will be "c:\python24\". The default install directory will show as "c:\python24\Lib\site-packages\". Accept the defaults or change them to match your own directory structure. Click Next to proceed.
    150 
    151 
    152 The next window in the dialog gives you a chance to cancel or continue. To continue, click Next.
    153 
    154 On the next window, the installer shows you installation progress as files are written to the target locations. When the processing is complete, click Finish. If you check the contents of c:\python24\Lib\site-packages\ directory, you should see the directory '''pysqlite2''', which contains the database scripts.
    155 
    156 
    157 === Install Subversion (optional) === #Subversion
    158 
    159 Trac 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.
    160 
    161 This document covers using the Subversion command line tools, but you can also use the [http://tortoisesvn.net/ TortoiseSVN] Windows GUI.
    162 
    163 Download and run the installer for the Subversion command line tools:
    164 [http://subversion.tigris.org/files/documents/15/35379/svn-1.4.2-setup.exe svn-1.4.2-setup.exe]
    165 
    166 The installation begins by displaying a small dialog titled '''Setup'''. It asks you whether you wish to continue. Click Yes.
    167 
    168 A larger window appears, titled '''Setup - Subversion'''. The first window of the dialog says "Welcome to the Subversion Setup Wizard". Click Next. Click "I accept the agreement" and then click Next. On the next window, read the important information and click Next.
    169 
    170 Select your destination directory for the Subversion installation. Click Next. You will then have the option of installing a Subversion menu item on the Start Menu, and a selection of places to put Subversion icons. Click Next. Finally you are ready to install. Click Next and the files will be copied to your selected destination. A couple more windows follow the install process, and then you're done.
    171 
    172 ====  ==== #svnbindings
    173 Go back to your command line to install the Subversion Python library:
    174 {{{
    175 easy_install -Z http://subversion.tigris.org/downloads/1.4.5-win32/apache-2.0/svn-python-1.4.5.win32-py2.5.exe
    176 
    177 }}}
    178 (pick the appropriate download link matching your installed Python version -- see [#svnbindings_installers the section under Method 1] where the links to svn/python bindings may be more up to date than here.)
    179 
    180 '''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.
    181 
    182 The installation process will begin with "Downloading http://subversion.tigris.org/downloads/svn-python-1.4.2.win32-py2.4.exe" and -- if successful -- ends with "Processing dependencies for svn-python==1.4.2".
    183 
    184 
    185 === Install ClearSilver (optional) ===
    186 
    187 Install the [http://www.clearsilver.net/ ClearSilver] template language:
    188 {{{
    189 easy_install -f http://clearsilver.net/downloads clearsilver==0.9.14
    190 }}}
    191 
    192 
    193 
    194 === Installing mod_python (optional) ===
    195 
    196 This is needed if you want to use with the Apache HTTP server.
    197 
    198 If you are using an Apache server, you will need the latest mod_python for windows, built against Python v2.5.  Currently version 3.3.1 is available at the [http://httpd.apache.org/download.cgi Apache] website (click on "Other Files" and surf to `modpython/win/3.3.1/`).  However, you can also get other versions [http://nicolas.lehuen.com/download/mod_python/ here], courtesy of a very kind and wise gentleman called Nicolas Lehuen.  See TracModPython for instructions.
    199 
    200 An alternative would be to use mod_wsgi (download [http://adal.chiriliuc.com/mod_wsgi/revision_1018_2.3/ mod_wsgi.so 2.3] for several Apache and Python combinations). See ["TracModWSGI"] for instructions.
    201 
    202 === Installing plugins ===
    203 
    204 There's no need to install the WebAdmin plugin, as it has now been integrated in Trac proper.
    205 Quite to the contrary, you should remove it if you're upgrading (it will be automatically disable though, so don't worry).
    206 
    207 See TracPlugins for details about plugin installation.
    208 
    209 For example, you can install the SpamFilter plugin. For that, you can grab them directly from the repository, and install it the same way you did for Trac:
    210 {{{
    211 > cd C:\src
    212 > svn checkout http://svn.edgewall.org/repos/trac/sandbox/spam-filter
    213 > cd spam-filter
    214 > python setup.py install
    215 }}}
    216 Note if you catch an error:"ImportError: No module named setuptools" please download http://peak.telecommunity.com/dist/ez_setup.py and install the setuptools.
    217 
    218 If for some reason the above step fails, either because there's no package for the Windows platform you're using or the setuptools don't manage to read information from your svn working copy (if you used Subversion 1.4 for doing the checkout), you'll probably need to install first a recent `setuptools` package, itself available from `http://svn.python.org/projects/sandbox/trunk/setuptools`. Version 0.7a1 (!r51948) from the repository worked for me.
    219 
    220 
    221 === Installing Trac ===
    222 
    223 You simply need the latest trunk (0.11dev) - to get this type the following in the command window. (Make sure you have added the Python install path (e.g. C:\Program Files\Python25) to your system PATH variable.  You can do this by right clicking on My Computer, clicking on Properties, selecting the Advanced tab, clicking the Environment Variables button, scrolling down the second list window until you see the 'Path' variable, then editing the string to add the Python install path).  Make sure you have [http://peak.telecommunity.com/DevCenter/EasyInstall#installation-instructions setuptools] installed before proceed.
    224 
    225 {{{
    226 > cd C:\src
    227 > svn checkout http://svn.edgewall.org/repos/trac/trunk
    228 > cd trunk
    229 > python setup.py install
    230 }}}
    231 
    232 
    233 Then, have a look at how to setup the TracEnvironment, use the TracStandalone web front-end and you're set.
    234 
    235 '''More specifically''', do this to get 0.11 with webadmin up and running:[[BR]]
    236 
    237 Create an administrator user (uses the script described lower in this page)[[BR]]
    238 {{{
    239 python trac-digest.py -u adm -p adm >> c:\digest.txt
    240 }}}
    241 
    242 Give that user all permissions[[BR]]
    243 {{{
    244 trac-admin c:\myproj permission add adm TRAC_ADMIN
    245 }}}
    246 
    247 Now...[[BR]]
    248 {{{
    249 tracd -p 8000 --auth=myproj,c:\digest.txt,trac c:\myproj
    250 }}}
    251 
    252 And you'll be able to see the Admin tab if you log in with 'adm'[[BR]]
    253 
    254 
    255 == Getting Started ==
    256 
    257 Ok, now that Trac and all its requirements have been installed you can create your first project and try it out.
    258 
    259 This 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.
    260 
    261 Back to the command line:
    262 {{{
    263 md c:\projects
    264 cd c:\projects
    265 }}}
    266 
    267 '''Optional:''' if you're using Trac with Subversion you can create a new repository for your source code:
    268 {{{
    269 md c:\projects\svn
    270 svnadmin create c:\projects\svn\my-project
    271 }}}
    272 
    273 This step causes Subversion to create a subdirectory (c:\projects\svn\my-project) containing the basics of a Subversion project.
    274 
    275 
    276 
    277 === Initialize a new Trac project environment: ===
    278 
    279 First go to the 'Scripts' folder in your Python install directory (e.g. "\Python25\Scripts"), and add the '.py' extension onto the files 'tracd' and 'trac-admin' if this is missing.  Then, type the following at the command line:
    280 
    281 
    282 {{{
    283 md c:\projects\trac
    284 c:\Python25\Scripts\trac-admin.exe c:\projects\trac\my-project initenv
    285 }}}
    286 
    287 Follow 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.
    288 
    289 {{{
    290 Project Name [My Project]>
    291 
    292 Database connecting string [sqlite:db/trac.db]>
    293 
    294 Repository type [svn]>
    295 
    296 Path to repository [/path/to/repos]>
    297 
    298 Template directory [C:\Python25\share\trac\templates]>
    299 }}}
    300 
    301 You may require to specify the Database connection string as [sqlite:db\\trac.db]
    302 After this response, the script will say "Creating and Initializing Project". A large number of messages will scroll, finishing with "Congratulations!".
    303 
    304 '''Note for Subversion users:''' when asked for the "Path to repository" input the folder of the repository you just created:
    305 {{{
    306 Path to repository [/path/to/repos]> c:/projects/svn/my-project
    307 }}}
    308 
    309 '''Note:''' be sure to include the full path, including the drive letter, and use forward slashes.
    310 
    311 == Try it out ==
    312 
    313 Trac 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:
    314 
    315 From the command line, and in the [Python Install]\Scripts directory:
    316 {{{
    317 tracd-script.py -p 8000 c:\projects\trac\my-project
    318 }}}
    319 
    320 > This exits with the following error on my system:
    321 
    322 > Usage: tracd-script.py [options] [projenv] ...
    323 
    324 > tracd-script.py: error: either the --env-parent-dir option or at least one
    325 > environment must be specified
    326 
    327 > The following works, though:
    328 {{{
    329 tracd.exe -p 8000 c:\projects\trac\my-project
    330 }}}
    331 > --- dummzeuch
    332 
    333 Open your browser to http://localhost:8000 to test out your new Trac project. You should see the title "Welcome to Trac 0.11" in your browser, and in the command window from which you just launched '''tracd''' there will be a series of status log messages. These messages will continue to update as you move around the Trac site. When you are done, return to the command window from which you launched tracd and press Ctrl+Break to stop tracd.
    334 
    335 
    336 === Creating authentication with tracd on Windows (Standalone) ===
    337 
    338 If you are running tracd without Apache, you can use this simple Python script to generate your passwords for tracd.  Copy the contents below into a new file called 'C:\Python25\scripts\trac-digest.py'.
    339 
    340 {{{
    341 #!python
    342 from optparse import OptionParser
    343 import md5
    344 
    345 # build the options
    346 usage = "usage: %prog [options]"
    347 parser = OptionParser(usage=usage)
    348 parser.add_option("-u", "--username",action="store", dest="username", type = "string",
    349                   help="the username for whom to generate a password")
    350 parser.add_option("-p", "--password",action="store", dest="password", type = "string",
    351                   help="the password to use")
    352 (options, args) = parser.parse_args()
    353 
    354 # check options
    355 if (options.username is None) or (options.password is None):
    356    parser.error("You must supply both the username and password")
    357    
    358 # Generate the string to enter into the htdigest file
    359 realm = 'trac'
    360 kd = lambda x: md5.md5(':'.join(x)).hexdigest()
    361 print ':'.join((options.username, realm, kd([options.username, realm, options.password])))
    362 }}}
    363 
    364 You can create a new password file, or add new users to the file, by executing this command from the command line:
    365 {{{
    366 C:\Python25\Scripts\trac-digest.py -u "My User Name" -p my@user@password >> C:\projects\passwords.txt
    367 
    368 }}}
    369 
    370 Then let's add full permission to the id that you created. And you will be able to see more administrator's menu.
    371 {{{
    372 C:\Python25\Scripts\trac-admin c:\projects\trac\my-project permission add "My User Name" TRAC_ADMIN
    373 
    374 }}}
    375 
    376 To start tracd with authentication, execute this command from the command line:
    377 {{{
    378 C:\Python25\Scripts\tracd-script.py -p 8000 --auth=my-project,C:\projects\passwords.txt,trac c:\projects\trac\my-project
    379 
    380 }}}
    381 
    382 === Running port 80 on tracd on Windows (Standalone) ===
    383 
    384 This describes getting IIS out of the way, so you can run tracd on port 80. This assumes Windows Server 2003 SP2 (IIS 6); I just haven't tried it on other versions.
    385 
    386 IIS typically listens to port 80 on all IP addresses, whether or not a website is assigned to an IP. This prevents other services from using port 80, including tracd. To get IIS to stop listening to all IP addresses, use '''httpcfg''' to tell it specific IP addresses.
    387 
    388 Install the Windows Server 2003 SP1 Support Tools.
    389   Normally found on the installation disk. (It originated with SP1, hence its name, even though Windows Server 2003 is now at SP2).[[BR]]
    390   Also found here:[[BR]]
    391   [http://www.petri.co.il/download_windows_2003_sp1_support_tools.htm][[BR]]
    392   [http://download.microsoft.com/download/3/e/4/3e438f5e-24ef-4637-abd1-981341d349c7/WindowsServer2003-KB892777-SupportTools-x86-ENU.exe]
    393  
    394   This basically just copies the tools, which are just executables. However, the installer does set Start menu links, which are handy for knowing what's there, so run it. The files end up in:
    395 
    396 {{{
    397 C:\Program Files\Support Tools\
    398 }}}
    399 
    400 List IP addresses currently listening: (this will be an empty list to start)
    401 {{{
    402 httpcfg query iplisten
    403 }}}
    404 
    405 Add IP address(es) to listen:
    406 {{{
    407 httpcfg set iplisten -i 127.0.0.1      (to keep it listening on localhost; seemed like a good idea)
    408 httpcfg set iplisten -i nnn.nn.n.nnn   (other IIS IP addresses as needed; NOT the one you want for tracd)
    409 }}}
    410 
    411 Stop and restart http service.[[BR]]
    412 Note the stop and start are different, to stop top-down, and start bottom-up. This is not simply restarting IIS. Sometimes this fails to restart; reboot the server.
    413 
    414 
    415 {{{
    416 net stop http /y
    417 net start w3svc
    418 }}}
    419 
    420 Run tracd
    421   Include the hostname option, so tracd runs on a specific IP that isn't in the IIS listening list.
    422   The IP address worked locally, but a host name seems required for remote access. IIS still seems to check it before passing on it.
    423 
    424 {{{
    425 tracd -b hostname.domain.com (and other options as needed)
    426 }}}
    427 
    428 '''Side notes:'''[[BR]]
    429 This specific listen list is also needed (and is how I discovered it) for installing different SSL certificates on multiple websites. This frees up the dialog boxes that allow entering a specific IP address for the SSL port 443.
    430 
    431 Later, if you add a new IP address and website to IIS, you must add it to this listen list. You'll forget. I don't remember the error message, but I'm sure it's vague, and it will drive you crazy.
    432 
    433 There are other toolkits (even though this task boiled down to the one above):
    434   - Windows Server 2003 Resource Kit Tools[[BR]]
    435   C:\Program Files\Windows Resource Kits\Tools\[[BR]]
    436   [http://www.microsoft.com/downloads/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&DisplayLang=en][[BR]]
    437   dnsdiag, tail, cmdhere, about 130 others.
    438 
    439 
    440   - IIS 6 Resource Kit Tools[[BR]]
    441   [http://support.microsoft.com/kb/840671][[BR]]
    442   C:\Program Files\IIS Resources\[[BR]]
    443   Metabase Explorer, SelfSSL, a dozen others.
    444 
    445 
    446   - SSL Diagnostics[[BR]]
    447   C:\Program Files\IIS Resources\[[BR]]
    448   (has a separate installer and start menu entry, but ends up in this folder with the others.)[[BR]]
    449   [http://www.microsoft.com/downloads/details.aspx?FamilyID=cabea1d0-5a10-41bc-83d4-06c814265282&DisplayLang=en][[BR]]
    450   SSLDiag.exe
    451 
    452 
    453 
    454 === Using SSL with tracd on Windows (Standalone) ===
    455 
    456 (Please fill this section out).
    457 
    458 
    459 == Troubleshooting ==
    460 
    461 ==== `pkg_resources.DistributionNotFound: Trac==0.11` ====
    462 
    463 You just installed Trac [milestone:0.11], now you're trying to use it (e.g. by using [TracStandalone tracd.exe] fresh from the Scripts/ directory in your Python installation) and you're welcomed by a backtrace featuring the above error...
    464 
    465 Chances are that like me you skipped the Genshi installation step, thinking you had a version recent enough (like 0.5dev). But you actually need 0.5 or newer (0.5.1, 0.6dev, etc.), 0.5dev won't work and you'll get the above (a bit misleading) error.
    466 
    467 Of course, this problem can only happen when using the binary installer for Trac, it can't happen when you're using `easy_install`.
    468 
    469 ==== Unsupported version control system "svn" ====
    470 
    471 The Subversion library is not installed properly.  Be sure you used the "-Z" option with easy_install when [#svnbindings installing] the Subversion bindings.
    472 
    473 Also, ensure you are using forward slashes for the svn repository directory.
    474 
    475 ==== Error: Setup script exited with error: Python was built with version 7.1 of Visual Studio, and extensions need to be built with the same version of the compiler, but it isn't installed. ====
    476 
    477 Note that something similar is probably happens between the apache 2.2 httpd.exe, python.exe, mod_python.so and the Subversion bindings. See #6739 and #5752, in particular comment:22:ticket:5752.
    478 
    479 From [http://www.mail-archive.com/trac-dev@googlegroups.com/msg00997.html]
    480 
    481 > The problem is that the pre-built Windows binaries for PySQLite are
    482 > currently not detected by setuptools, so it is trying to download and
    483 > compile the sources which requires a build environment.  Unfortunately
    484 
    485 > this is not particularly common or easy on Windows.  I have reported
    486 > the problem to the PySQLite developers, so hopefully they will
    487 > addresss this soon: http://initd.org/tracker/pysqlite/ticket/191
    488 
    489 
    490 It appears you can successfully install Trac by following a combination of Method 2: Manual Installation and Method 1: Using Installers, above. The critical step for installing PySQLite is to use the self-installing EXE version, which does not trigger the bogus compile step. As noted above, download and execute the appropriate file:
    491 
    492 
    493 || ''PySqlite'' ||  [http://initd.org/pub/software/pysqlite/releases/2.3/2.3.2/pysqlite-2.3.2.win32-py2.4.exe pysqlite-2.3.2.win32-py2.4.exe] (or the [http://initd.org/pub/software/pysqlite/releases/2.3/2.3.2/pysqlite-2.3.2.win32-py2.3.exe Python 2.3 version]) ||
    494 
    495 
     189More information about the TracEnvironment setup, and the TracStandalone web front-end is available.
    496190
    497191----
    498192See also: the TracOnWindows/Advanced instructions, TracOnWindows/Rewrite for discussing improvements to this page, ["0.10/TracOnWindows"] and ["Trac0.9/TracOnWindows"] for the previous version of this document. [http://how-to-solutions.com/how-to-install-trac-on-windows.html Installing Trac on Windows]
    499