Version 1 (modified by trac, 16 years ago) (diff)


Windows Installation instructions for SVN w/TRAC

Versions used in this example (Available 2004-05-13):

  • Apache 2.0.49
  • Python 2.3.3
  • SVN 1.0.2
  • SQLite 2.8.13
  • PySQLite 0.5.0-py2.3
  • Trac 0.6.1

Email Daragh Fitzpatrick for more info, or if you changed this page (since this Wiki does not support watch/subscription)

Note: This example installs to D:

Arm Yourself

  1. Get & Read book

Install SubVersioN Pre-Requisites

  1. Install Python
    Add D:Python to path
  1. Install Apache
  1. Install Subversion

Create Repository

  1. Create Repository Directory
    D:> md d:svn
  1. Create Repository
    D:> svnadmin create d:svn
  1. Create skeleton repository structure in d: empproject Example:
  1. Build Repository Tree
    D:> svn import d:	empproject file:///d:/svn/repo1 -m "Initial Load"
  1. Create local sandbox
    D:> svn checkout file:///d:/svn/repo1 d:project

Configure Apache

  1. Copy files
    D:> copy d:progra~1subver~1httpd*.* d:progra~1apache~1apache2modules
  1. Create password file (w/user 'admin')
    D:> d:progra~1apache~1apache2inhtpasswd -cm d:svn.htaccess admin
  1. Configure Apache (edit httpd.conf) 12.1. Restrict access/lockdown as appropriate

12.2. Add Modules to httpd.conf

12.1.1. Uncomment:

LoadModule dav_module modules/

12.1.2. Add (after):

# Subversion
LoadModule dav_svn_module modules/

12.3. Add location root for multiple repositories

# Subversion
<Location /svn>
  DAV svn
  # any /svn/foo URL will map to a repository D:/svn/foo
  SVNParentPath D:/svn
  AuthType Basic
  AuthName "Subversion repository"
  AuthUserFile d:/svn/.htaccess
  Require valid-user
  1. Restart your MACHINE
  1. Test your install of Subversion http://[hostname]:80/svn/repo1

Phew! Subversion is installed and working - Grab a beverage for yourself.

Setup Users

  1. Add users to password file
    D:> d:progra~1apache~1apache2inhtpasswd -m d:svn.htaccess user

Install TRAC Prerequisites

  1. Install Subversion Python Bindings (Get from same download page as Subversion)
    Copy libsvn and svn directories to D:Python23Lib
  1. Install SQLite
    Copy sqlite.exe to D:Program FilesSQLite
  1. Install PySQLite
  1. Install TRAC

Fix a few things

  1. (BUG) Edit first line of D:Python23Scripts rac-admin to have:
  1. (BUG) Edit first line of D:Python23share raccgi-bin rac.cgi to have:
  1. Copy CGI
    D:> copy d:python23share	raccgi-bin	rac.cgi d:progra~1apache~1apache2cgi-bin
  1. (BUG) not able to run trac-admin initenv... Not available in 0.6.1

Configure TRAC DB

  1. Run trac-admin
    D:Python23Scripts> python trac-admin d:/svn/trac.db
  1. Initialize DB
    Trac [d:/svn/trac.db]> initdb
      Enter project name
      Enter path to repository
      Enter path to templates
        d:Python23share	rac	emplates
      (BUG) Note error message regarding wiki-pages
  1. (BUG) Load Wiki
    Trac [d:/svn/trac.db]> wiki load d:/python23/share/trac/wiki-default
  1. Add administrative permissions
    Trac [d:/svn/trac.db]> permission add admin TICKET_ADMIN
    Trac [d:/svn/trac.db]> permission add admin REPORT_CREATE
    Trac [d:/svn/trac.db]> permission add admin REPORT_MODIFY
    Trac [d:/svn/trac.db]> permission add admin REPORT_DELETE
    Trac [d:/svn/trac.db]> permission add admin REPORT_ADMIN
    Trac [d:/svn/trac.db]> permission add admin WIKI_DELETE
    Trac [d:/svn/trac.db]> permission add admin WIKI_ADMIN
    Trac [d:/svn/trac.db]> permission add admin CONFIG_VIEW
    Trac [d:/svn/trac.db]> permission add admin TRAC_ADMIN

Add TRAC to Apache

  1. Edit httpd.conf: Add: (copy this - there's a typo in Edgewall's version)
    # TRAC
    Alias /trac "D:/Python23/share/trac/htdocs"
    <Directory "D:/Python23/share/trac/htdocs">
      Options Indexes MultiViews
      AllowOverride None
      Order allow,deny
      Allow from all
    <Location "/cgi-bin/trac.cgi">
      SetEnv TRAC_DB "d:/svn/trac.db"
    <Location "/cgi-bin/trac.cgi/login">
      AuthType Basic
      AuthName "Project"
      AuthUserFile D:/svn/.htaccess
      Require valid-user
  1. Restart Apache
  1. Hold your breath, test TRAC install http://[hostname]:80/cgi-bin/trac.cgi


  1. Install SVN Clients as necessary (try Rapid SVN & Tortoise SVN)
  1. Don't forget to lock down the security on the box!
  1. Now go get a *real* drink

Email Daragh Fitzpatrick with any questions!