Installation notes for Trac 0.11 on Debian Lenny
I’ve installed Trac a few times, years ago, but quite a lot of installs on Debian (so far) have been problematic through poor packaging… so here are some notes as I proceed.
My goal is a Trac installation, running via Apache2 (i.e. over port 80 via a subdomain name), integrated with SVN.
Starting out from : http://trac.edgewall.org/wiki/TracOnDebian and http://trac.edgewall.org/wiki/TracInstall.
Also following the README.debian file under /usr/share/doc/trac.
It seems the basic installation steps are :
- Install the trac environment
- The confusing talk about an SVN repository has nothing to do with Trac’s needs. It’s about your own project repository. If you have one which you wish to make accessible within Trac, you’ll soon be asked to provide a path to it.
- Create the initial trac environment : trac-admin /var/trac-environments/trac_mosaic initenv
- Make sure Apache will be able to read the svn repository database “chown -R www-data:www-data project_mosaic”
- You’re already far enough to run the standalone trac server and get going… but only over a strange port (if port 80 is already being taken by apache).
- Hook it into Apache
- Mod Python for Apache seems the best way to go (2nd fastest response times, well tested, simple(ish) installation instructions).
- apt-get install libapache2-mod-python
- Now setup your vhost
- https://coderanger.net/~coderanger/tracdoc/install/mod_python.html
- cd /etc/apache2/sites-available
- cp default [yourprojectname]
- vi [yourprojectname] and setup the vhost as in the coderanger.net link
- You only need to setup the root svn project probably
- don’t forget to create the htpasswd file with : “htpasswd -c htpasswd ben” (in the directory you’re pointing at from the vhost configuration)
- enable the site with “a2ensite [yourprojectname]“
- https://coderanger.net/~coderanger/tracdoc/install/mod_python.html
- So far so good! Worked first time!
- Mod Python for Apache seems the best way to go (2nd fastest response times, well tested, simple(ish) installation instructions).
- To find out where trac was installed by debian just type “dpkg -L” (it’s mostly in /usr/share/pyshared/trac)
- Now add your admin user :
trac-admin /path/to/projenv permission add bob TRAC_ADMIN