Install Trac Issue Tracking System on Windows

Install
Download and install Python (python-2.5.4.msi) from Python site. This also installs SQLite.

Download and install Genshi (Genshi-0.5.1.zip) from Genshi site

Genshi-0.5.1>c:\Python25\python setup.py install

Download and install Python setup tools (setuptools-0.6c9.win32-py2.5.exe) from its download site

Download and install Trac (Trac-0.11.2.1.win32.exe) from Trac site

Create a project environment

C:\Python25\Scripts>trac-admin C:/work/trac initenv
Project Name [My Project]>
Database connection string [sqlite:db/trac.db]>
Repository type [svn]>
Path to repository [/path/to/repos]>
...
---------------------------------------------------------------------
Project environment for 'My Project' created.
You may now configure the environment by editing the file:
  C:\work\trac\conf\trac.ini
If you'd like to take this new project environment for a test drive,
try running the Trac standalone web server `tracd`:
  tracd --port 8000 C:\work\trac
Then point your browser to http://localhost:8000/trac.

Integrate with Apache 2.2 with mod_python
Download and install Apache 2.2 (apache_2.2.9-win32-x86-openssl-0.9.8h-r2.msi)

Download and install mod_python (mod_python-3.3.1.win32-py2.5-Apache2.2.exe) from Apache mod_python download page

Add to Apache 2.2 httpd.conf file

LoadModule python_module modules/mod_python.so
<Location /trac>
  SetHandler mod_python
  PythonInterpreter main_interpreter
  PythonHandler trac.web.modpython_frontend 
  PythonOption TracEnv C:/work/trac
  PythonOption TracUriRoot /trac
</Location>

Start Apache 2.2 and point browser to
http://localhost:8080/trac

Setup Authentication
Add to Apache 2.2 httpd.conf

LoadModule ldap_module modules/mod_ldap.so
LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
 
<Location /trac>
  SetHandler mod_python
  PythonInterpreter main_interpreter
  PythonHandler trac.web.modpython_frontend 
  PythonOption TracEnv C:/work/trac
  PythonOption TracUriRoot /trac
 
  Order allow,deny
  Allow from all
 
  AuthType Basic
  AuthBasicProvider ldap
  AuthName "Trac"
  AuthzLDAPAuthoritative off
 
  #OpenLDAP
  AuthLDAPURL ldap://127.0.0.1:389/ou=Users,dc=example,dc=com
  AuthLDAPBindDN "cn=Manager,dc=example,dc=com"
  AuthLDAPBindPassword "secret"
 
  #Active directory note port 3268 NOT 389
  #AuthLDAPURL "ldap://adserver.company.com:3268/DC=company,DC=com?sAMAccountName?sub?(objectClass=user)"
  #AuthLDAPBindDN       ldap-auth-user@company.com
  #AuthLDAPBindPassword "the_password"
 
  Require valid-user
</Location>

Integrate with SVN
Download and install SVN binding for Python built for Apache 2.2 (svn-python-1.5.4.win32-py2.5.exe) from SVN site
Set repository_dir in trac.ini

[trac]
repository_dir = C:/svn

Restart Apache

trac-admin
Add admin user

trac-admin /path/to/my/project
permission add username TRAC_ADMIN
permission list username

Change Site Logo
Place custom logo image file in htdocs directory, e.g. trac_logo.png
Edit trac.ini

src = site/trac_logo.png

References
TracOnWindows

This entry was posted in win and tagged . Bookmark the permalink.