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
- Get & Read book http://svnbook.red-bean.com
Install SubVersioN Pre-Requisites
- Install Python
http://www.python.org
Add D:\Python to path
- Install Apache http://httpd.apache.org
- Install Subversion http://subversion.tigris.org
Create Repository
- Create Repository Directory
D:\> md d:\svn
- Create Repository
D:\> svnadmin create d:\svn\repo1
- Create skeleton repository structure in d:\temp\project
Example:
/project /vendor /tags /trunk files /projectname /branches /tags /trunk files
- Build Repository Tree
D:\> svn import d:\temp\project file:///d:/svn/repo1 -m "Initial Load"
- Create local sandbox
D:\> svn checkout file:///d:/svn/repo1 d:\project
Configure Apache
- Copy files
D:\> copy d:\progra~1\subver~1\httpd\*.* d:\progra~1\apache~1\apache2\modules
- Create password file (w/user 'admin')
D:\> d:\progra~1\apache~1\apache2\bin\htpasswd -cm d:\svn\.htaccess admin
- 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/mod_dav.so12.1.2. Add (after):
# Subversion LoadModule dav_svn_module modules/mod_dav_svn.so
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 </Location>
- Restart your MACHINE
- Test your install of Subversion http://[hostname]:80/svn/repo1
Phew! Subversion is installed and working - Grab a beverage for yourself.
Setup Users
- Add users to password file
D:\> d:\progra~1\apache~1\apache2\bin\htpasswd -m d:\svn\.htaccess user
Install TRAC Prerequisites
- Install Subversion Python Bindings
(Get from same download page as Subversion)
Copy libsvn and svn directories to D:\Python23\Lib
- Install SQLite
http://www.sqlite.org
Copy sqlite.exe to D:\Program Files\SQLite
- Install PySQLite http://pysqlite.sourceforge.net
- Install TRAC http://www.edgewall.com/products/trac/
Fix a few things
- (BUG) Edit first line of D:\Python23\Scripts\trac-admin to have:
#!D:\Python23\python.exe
- (BUG) Edit first line of D:\Python23\share\trac\cgi-bin\trac.cgi to have:
#!D:\Python23\python.exe
- Copy CGI
D:\> copy d:\python23\share\trac\cgi-bin\trac.cgi d:\progra~1\apache~1\apache2\cgi-bin
- (BUG) not able to run trac-admin initenv... Not available in 0.6.1
Configure TRAC DB
- Run trac-admin
D:\Python23\Scripts> python trac-admin d:/svn/trac.db
- Initialize DB
Trac [d:/svn/trac.db]> initdb
Enter project name Project Enter path to repository d:\svn\repo1 Enter path to templates d:\Python23\share\trac\templates (BUG) Note error message regarding wiki-pages
- (BUG) Load Wiki
Trac [d:/svn/trac.db]> wiki load d:/python23/share/trac/wiki-default
- 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
- 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 </Directory> <Location "/cgi-bin/trac.cgi"> SetEnv TRAC_DB "d:/svn/trac.db" </Location> <Location "/cgi-bin/trac.cgi/login"> AuthType Basic AuthName "Project" AuthUserFile D:/svn/.htaccess Require valid-user </Location>
- Restart Apache
- Hold your breath, test TRAC install http://[hostname]:80/cgi-bin/trac.cgi
Finally…
- Install SVN Clients as necessary (try Rapid SVN & Tortoise SVN)
- Don't forget to lock down the security on the box!
- Now go get a *real* drink
Email Daragh Fitzpatrick with any questions!
Last modified
20 years ago
Last modified on 11/17/04 15:27:55
Note:
See TracWiki
for help on using the wiki.