How come every time I install trac I do it a different way? Mostly, I'm installing on Centos or Fedora these days. The RPMs available rpmforge only go up to trac 0.10. It seems sensible to go with the 0.11 beta for a new installation - the trac admin web UI is included by default, there are fewer dependencies and the default ticket workflow has changed a bit. After some fiddling about with the manual download, realising that trac.cgi is missing (maybe it's deprecated) I realised that installation is fairly straightforward if you get setuptools (some strange python "egg" installer) and use modpython rather than cgi/fcgi (it's more efficient and easier anyway).
So here are my steps so I don't forget them:
# As root
wget http://peak.telecommunity.com/dist/ez_setup.py
python ez_setup.py
easy_install Pygments
easy_install Genshi
easy_install Trac
trac-admin /srv/trac/myproject initenv
chown -R apache:apache /srv/trac/myproject
nano /etc/httpd.d/trac.conf
# And add something like:
<Location "/trac">
SetHandler mod_python
PythonInterpreter main_interpreter
PythonHandler trac.web.modpython_frontend
PythonOption TracEnvParentDir /srv/trac
PythonOption TracUriRoot /trac
# The following gives basic HTTP authentication
AuthType Basic
AuthName "Trac"
AuthUserFile /srv/users.htpasswd
Require valid-user
# ... which should be used with SSL:
SSLRequireSSL
</Location>
service httpd restart