Download and install Trac’’s requirements from the ubuntu repositories. Please note that Subversion is optional for Trac, but handy during softwaredevelopment, so I added it to the list.
sudo apt-get install apache2 subversion mysql-server python python-mysqldb
Download and install mod_python for Apache and enable the module.
sudo apt-get install libapache2-mod-python libapache2-mod-python-doc a2enmod mod_python
You need to add the following to your “httpd.conf”, to add a simple setup of Trac:
<Location /projects/myproject> SetHandler mod_python PythonInterpreter main_interpreter PythonHandler trac.web.modpython_frontend PythonOption TracEnv /home/trac/myproject PythonOption TracUriRoot /projects/myproject </Location>
Download and install Trac 0.10.4 from the ubuntu repositories.
sudo apt-get install trac
Download the ClearSilver source, extract the source and open the directory.
wget http://www.clearsilver.net/downloads/clearsilver-0.10.4.tar.gz tar -xzf clearsilver-0.10.4.tar.gz cd clearsilver-0.10.4/
To get ClearSilver working with python2.5, I had to change one line in “configure”. So open the file and add version “2.5″ to the allowed python versions.
vim configure
Go to line 6560, and change the line to:
python_versions="2.5 2.4 2.3 2.2 2.1 2.0 1.5 24 23 22 21 20 15"
and another line in “configure.in”:
vim configure.in
Go to line 250, and change the line to:
python_versions="2.5 2.4 2.3 2.2 2.1 2.0 1.5 24 23 22 21 20 15"
Build the new “neo_cgi.so” and copy it to the site-packages:
./configure make make install cp python/build/lib.linux-x86_64-2.5/neo_cgi.so /usr/lib/python2.5/site-packages/neo_cgi.so
Create a new Trac-environment.
trac-admin /home/trac/myproject/ initenv
Test your installation by browsing to “http://localhost/projects/myproject“. An example page of Trac will be displayed. Happy bugtracking!