Trac is a decent bug tracking software that is getting a lot of attention these days. It’s very simple to use, which I like. It includes subversion integration so that you can walk through your source code tree and view diffs from one version to another. Handy.

However, Trac’s installation process has a lot of room for improvement in the simplicity department. Here are the steps I went through to install trac on Cent OS 5. I captured them so that others may find it easier to get Trac up and running. Enjoy.

If these instructions work for you, please leave a comment! If they don’t, please leave a comment!

  1. Install python and it’s goodies.
    1. Use yum to install the base package: yum install python
    2. Install mod_python. This is so Apache can run the python scripts as a module:
      yum install mod_python
    3. Install MySQL-python so that python can interact with mysql
      1. Download and untar MySQL-python from http://sourceforge.net/projects/mysql-python
      2. cd $mysqlpythonsourcedir
      3. python setup.py build && python setup.py install
  2. Install some devel packages that are needed for compiling trac and svn integration:
    yum install neon neon-devel python-devel swig
  3. Install Clearsilver, a templating package that trac depends on.
    1. Download and untar clearsilver from http://www.clearsilver.net/downloads/
    2. Compile cd $clearsilversourcedir; ./configure && make && make install
  4. Install trac!
    1. Download and untar trac from http://trac.edgewall.org/wiki/TracDownload
    2. cd $tracsourcedir; python ./setup.py install
    3. Initialize your first trac project:
      trac-admin $pathtoyourtracproject initenv
    4. Tell Apache about trac.. Add the following lines to your Apache configuration file:
        <Location />
          SetHandler mod_python
          PythonHandler trac.web.mod python_frontend
          PythonOption TracEnv $pathtoyourtracproject
          PythonOption TracUriRoot /trac/
        </Location>
      

Finally, restart httpd and try it out by going to:

http://$yourhost/trac/

If it doesn’t work, check in your webserver error log for errors:
tail -f /var/log/httpd/error_log

Again, please leave a comment so that you may help others with the same problems you have.