Installing Trac on Linux (Debian Stable)

Now that you've installed a dummy Debian package for Subversion you are ready to install Trac. I wanted to use the very latest version of Trac so I opted for building it from source using the latest code via the Trac Subversion repository.

The first thing to do is install the current Debian stable Trac package, this will install all the dependencies that we need (there are quite a few):
apt-get install trac

Once that's complete, we want to remove just the Trac package so that we can install it from source:
apt-get remove trac

To be able to build Trac from source it requires the Python development libraries:
apt-get install python-dev

Then we can checkout the latest version of the Trac source code (I did this in my home directory):
svn co Trac

Then change directory into the Trac directory and as root issue the following command to build and install Trac:
./ install

This step is optional, but if you want to ensure that get the latest version, periodically run svn update from the Trac directory (where ever you checked it out to) and then reinstall it (as root):
./ install

Ok, that's the basic version of Trac installed, but you still won't be able to access the wiki, ticket management system or source code repository browser as you will need to create an instance of Trac that points at your repository and add it to an Apache virtual host, but hey, that's a topic for another post!

Technorati Tags: , , ,


Anonymous said...

Thanks for your article, heres another useful article i found:

Trac install on Debian

abeacock said...

Thank you very much! I've just added that link to my bookmarks.

Deepak Mittal said...

Hi Andrew,

Thanks for the simple and useful post. Using this, I got trac on my server working in less than 5 minutes.


mosab said...

on a newly installed debain you need also the python-setuptools package

apt-get install python-setuptools