Edgewall Software

Version 71 (modified by jim@…, 14 years ago) ( diff )

Moving Sarge installation to new page

Installing and Running Trac on Debian

Releases other than Woody

Debian distributes Trac since Sarge, which has Trac 0.81. You can track version numbers in the not stable releases at http://packages.debian.org/trac.

Sarge users who want to track Edgewall's [latest] version need to add a few lines to their /etc/apt/sources.list :

# Trac and clearsilver
deb http://ftp.edgewall.com/pub/debian sarge trac

Then update APT's cache :

 $ apt-get update

Whether the above steps to get Edgewall's version instead of Debian's were followed or not, installing Trac should be as simple as installing the trac package.

Woody (oldstable)

Woody users need to add a few lines to their /etc/apt/sources.list before installing Trac:

# Trac, clearsilver, sqlite, pysqlite
deb http://ftp.edgewall.com/pub/debian woody trac
# Subversion, Apache2
deb http://people.debian.org/~adconrad woody subversion

After editing the file, installing the trac package should install Trac:

 $ apt-get update
 $ apt-get install trac

Note: While installing Trac on Debian Woody you might get some harmless warnings when the installation process byte-compiles some source files.

More notes for Trac 0.8 on Debian Woody:

Notice, this is what worked for me on a new Woody system I built just to host Trac (in a VMware image, yet!), so I was able to be a little free with modifications I made. Be more careful if you are adding Trac to a system you use for other tasks - don't blame me if these instructions break something!

These instructions ignore the above and start at the very beginning.

  • Subversion really wants Apache2 installed. If you run apache2 -v and get an error, you'll need to install Apache2. I removed apache 1.3 and installed Apache2 with the following:
    apt-get install apache2-common apache2-doc apache2-mpm-worker libapache2-svn
    apt-get remove apache
    apache2 -k start
    Also, edit /etc/default/apache2 so it says NO_START=0 if you want apache2 to run on boot.
  • Trac 0.8 runs better with Python 2.2 and python-xml (without them, diffs and attachment uploading will not work). Note that Trac's email notifications will not work unless you have Python 2.2.2 or greater. Since I couldn't find a Debian/stable .deb for anything higher than Python 2.2.1, I gave up on email notifications. Everything else seems to be workng though!
    apt-get install python2.2-xmlbase python2.2-sqlite
    cd /usr/bin
    mv python python.orig
    ln -s python2.3 python
    cp -R /usr/lib/python2.1/site-packages /usr/lib/python2.3
    apache2 -k restart

  • Be careful with the above steps. I attempted to follow them on an "existing" (i.e. not fresh) woody box and was unsuccessful in part because I had managed to install a newer version of subversion from source before deciding to try the packages. I decided to bite the bullet and upgrade to sarge so I could use the goodness that is apt while also using fsfs repositories. Aside from breaking my pptpd install, the upgrade only partially solved my trac/subversion woes; I was able to get apache2-mod-svn working, but trac-admin from the command line would fail when one of the subversion Python modules went looking for libswig1.3.21 and I had only libswig1.3.22; symlinking libswig1.3.21.so → libswig1.3.22.so solved that problem but left me with another error in fs.py when running trac-admin help from the command line. After much gnashing of teeth, I tried removing the subversion package and the trac package; this triggered an uninstall of several then-unused support packages, including python2.3. However, /usr/lib/python2.3 still existed and was not empty, despite the apt database showing absolutely no python packages of any version installed. I manually rm'd /usr/lib/python2.3, did an aptitude install subversion trac, and stuff worked; I'm fairly convinced that the manual reworkings of the python install (as described above) were directly related, if not causative, in the problem; the fix could have been as simple as:
    aptitude remove subversion trac python2.3
    rm -r /usr/lib/python2.3
    aptitude install subversion trac python2.3
    after I had upgraded to sarge. The removal of python2.3 and the rm of /usr/lib/python2.3 are critical; prior to doing this, I had also tried removing subversion and trac and reinstlling, first from binary and then from source packages; that didn't help.
  • Sorry you had issues, but please note I made the python choices shown specifically for Woody. Your issues stem from being upgraded to Sarge. python2.3 wasn't available in woody when I wrote these instructions, and I made careful note of that. I too had more than a few problems with python (hence these instructions!), so I know where you're coming from. But pure Woody users won't have access to python2.3 as far as I know.

  • After completing these pre-requisites, I added the following to /etc/apt/sources.list
    deb http://ftp.edgewall.com/pub/debian woody trac
    deb http://people.debian.org/~adconrad woody subversion
    and ran …

Debian Sarge 3.1 (stable)

See TracOnDebianSarge

Running Trac from trunk

Furthermore, there is a guide on building the Debian Trac package from the trunk at TracOnDebianFromTrunk

Note: See TracWiki for help on using the wiki.