= Installing and Running Trac on Debian = {{{ #!html
Note from mgood: I am currently in the process of rewriting this page. It is not currently complete, but should cover the most common topics already. If you have more questions you may want to refer back to the previous revision of this page I have finished.
}}} '''Note:''' ''This page does not provide step-by-step instructions for installing and configuring all of Trac. Use this page as a reference for installing the Debian software packages and the locations of configuration files, but you will need to read TracInstall and the other documentation sections for complete instructions on running and configuring Trac.'' These instructions require the Debian Sarge release or newer. There are instructions below for [wiki:TracOnDebian#Woodyoldstable installing Trac on Woody]. Check http://packages.debian.org/trac to see the latest available Trac version for your Debian release. These instructions use the commandline tool `apt-get` to install the packages which you will need to run as the `root` user. If you prefer to use a graphical tool such as `synaptic` you can search for the package names mentioned to install them. == Required Packages == {{{ apt-get install trac }}} == Apache == Trac can be run in [wiki:TracStandalone standalone mode], or with a web server of your choice. [http://httpd.apache.org/ Apache] is a recommended choice and packages are available for Debian: {{{ apt-get install apache2 }}} In addition to installing the server itself you will need to install one of the Apache modules mentioned below to allow the Trac application to run under Apache. Each subsection refers to the general Trac documentation for the Apache configuration necessary for that module. On Debian it is recommended to put your Trac Apache configuration statements into a new file called "/etc/apache2/sites-available/trac". Then use the following command to enable your Trac site: {{{ a2ensite trac }}} Most people won't run trac as a separate site and prefer it as /trac/ on the primary site. To get this to work, create a file /etc/apache2/conf.d/trac.conf with the following content: {{{ ScriptAlias /trac /usr/lib/cgi-bin/trac.fcgiOn Debian it is recommended to put your Trac Apache configuration statements into a new file called "/etc/apache2/sites-available/trac". Then use the following command to enable your Trac site:HTH Marcel Whilst trying to get Trac working on Debian Sarge with Python 2.3, I got the following error: {{{ PythonHandler trac.web.modpython_frontend: ImportError: No module named web }}} I found that I had to use this line in the Apache2 config rather than the one given: {{{ # PythonHandler trac.web.modpython_frontend PythonHandler trac.ModPythonHandler }}} {{{ #!html
This is because you installed the old/stable 0.8x version of trac, but the pythonhandler trac.web.modpython_frontend is for 0.9x which you get as unstable/testing!
}}} I always have trouble finding this page so I'll post a link here. It's relevent enough that someone could merge it in... [wiki:TracOnDebianSarge latest trac on sarge]