2 | | = Trac on Windows = |
3 | | |
4 | | == Install Python == |
5 | | |
6 | | Trac is written in [http://python.org Python], so you will first need to install Python. |
7 | | |
8 | | The recommended version of Python at this time is 2.4.4. 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]). |
9 | | |
| 2 | = Trac On Windows = |
| 3 | |
| 4 | The installation of Trac on Windows is now much simpler, due to the drop 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). |
| 5 | |
| 6 | If furthermore you don't need to interface with Subversion, then all you need besides are a few Python packages. |
| 7 | 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. |
| 8 | |
| 9 | == Installing Python on Windows == |
| 10 | |
| 11 | After the installation, don't forget to 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. |
| 12 | |
| 13 | === Python 2.4 === |
13 | | Then 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. |
14 | | |
15 | | == Method 1: Experimental All-In-One Installer == |
16 | | |
17 | | ''Note: I don't believe that this method works at all. I believe that it was authored when the latest version of pysqlite was compatible with python 2.4.4. At this time the latest version of pysqlite does NOT seem to work with 2.4.4. So when using this approach you end up with a trac installation that fails. You have to back out of all of this and then try method 2 below, which worked for me.'' |
18 | | |
19 | | This installation script only requires a Python 2.4 installation and will download and install the basic Trac dependencies and optionally the Subversion libraries. It does not always succeed - see the section Troubleshooting below - if you have problems, try Method 3. |
20 | | |
21 | | 1. Download and double-click this script to install Trac: [attachment:trac-0.10.3-win32-install.py?format=raw trac-0.10.3-win32-install.py] |
22 | | 1. Download and run the installer for the Subversion command line tools: [http://subversion.tigris.org/files/documents/15/38369/svn-1.4.4-setup.exe svn-1.4.4-setup.exe] (only if you actually need to interface Trac with Subversion of course; since Trac 0.10, Subversion is not a requirement anymore) |
23 | | 1. Once that's done you can skip ahead to [#GettingStarted Getting Started]. |
24 | | |
25 | | ,,If 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.3-win32-install.py`" [enter].,, |
26 | | |
27 | | |
28 | | == Method 2: Using Installers == |
| 17 | |
| 18 | === Python 2.5 === |
| 19 | Simply [http://www.python.org/download/releases/2.5/#download-the-release download] and install the appropriate .msi for your Python platform: |
| 20 | - [http://www.python.org/ftp/python/2.5/python-2.5.msi Python-2.5.msi] |
| 21 | - [http://www.python.org/ftp/python/2.5/python-2.5.amd64.msi Python-2.5.amd64.msi] |
| 22 | - [http://www.python.org/ftp/python/2.5/python-2.5.ia64.msi Python-2.5.ia64.msi] |
| 23 | |
| 24 | |
| 25 | == Method 1: Using Installers == |
67 | | === Install ClearSilver === |
68 | | |
69 | | Install the [http://www.clearsilver.net/ ClearSilver] template language: |
70 | | {{{ |
71 | | easy_install -f http://clearsilver.net/downloads clearsilver==0.9.14 |
72 | | }}} |
| 63 | |
| 64 | |
| 65 | == Installing Genshi == |
| 66 | |
| 67 | [http://genshi.edgewall.org/wiki/Download#Zippackage Download] the zip package: |
| 68 | - [http://ftp.edgewall.com/pub/genshi/Genshi-0.4.4.zip Genshi-0.4.4.zip] |
| 69 | |
| 70 | 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.) |
| 71 | |
| 72 | |
| 73 | == Installing Trac == |
| 74 | |
| 75 | You simply need the latest trunk (0.11dev) (beta1 to come ''very'' soon) - 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. |
| 76 | |
| 77 | {{{ |
| 78 | > cd C:\src |
| 79 | > svn checkout http://svn.edgewall.org/repos/trac/trunk |
| 80 | > cd trunk |
| 81 | > python setup.py install |
| 82 | }}} |
| 83 | |
| 84 | |
| 85 | Then, have a look at how to setup the TracEnvironment, use the TracStandalone web front-end and you're set. |
| 86 | |
| 87 | '''More specifically''', do this to get 0.11 with webadmin up and running:[[BR]] |
| 88 | |
| 89 | Create an administrator user (uses a script described elsewhere in the wiki)[[BR]] |
| 90 | python trac-digest.py -u adm -p adm >> c:\digest.txt[[BR]] |
| 91 | |
| 92 | Give that user all permissions[[BR]] |
| 93 | trac-admin c:\myproj permission add adm TRAC_ADMIN[[BR]] |
| 94 | |
| 95 | Now...[[BR]] |
| 96 | tracd -p 8000 --auth=myproj,c:\digest.txt,trac c:\myproj[[BR]] |
| 97 | |
| 98 | And you'll be able to see the Admin tab if you log in with 'adm'[[BR]] |
| 99 | |
| 100 | |
| 101 | == Installing mod_python for use with the Apache HTTP server == |
| 102 | |
| 103 | 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. |
| 104 | |
| 105 | == Installing plugins == |
| 106 | |
| 107 | There's no need to install the WebAdmin plugin, as it has now been integrated in Trac proper. |
| 108 | Quite to the contrary, you should remove it if you're upgrading (it will be automatically disable though, so don't worry). |
| 109 | |
| 110 | See TracPlugins for details about plugin installation. |
| 111 | |
| 112 | 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: |
| 113 | {{{ |
| 114 | > cd C:\src |
| 115 | > svn checkout http://svn.edgewall.org/repos/trac/sandbox/spam-filter |
| 116 | > cd spam-filter |
| 117 | > python setup.py install |
| 118 | }}} |
| 119 | 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. |
| 120 | |
| 121 | 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. |