HOWTO: Install Trac

(Back to DeveloperDocs)

If you want to install a new trac instance, skip to "Create a new Trac project" below.

The following steps are recorded for posterity, so we remember how we set it up.

Install the trac package

# apt-get intall trac

Set up the web root

# mkdir /var/www/projects
# cd /var/www/projects
# ln -s /usr/share/trac/cgi-bin/trac.cgi .
# touch index.html

Set up apache

Enable mod-rewrite:

# cd /etc/apache2/mods-enabled
# ln -s ../mods-available/rewrite.load .

Create the apache conf file for this site:

# cd /etc/apache2/sites-enabled
# vi trac.conf
(Use the configuration file found here under "Global Authentication": http://projects.edgewall.com/trac/wiki/TracMultipleProjects)

Create directory where trac will live:

# mkdir /usr/local/trac-projects
# cd /usr/local/trac-projects
# htpasswd -c trac.htpasswd admin

Create a new Trac project

(Note: do NOT create the directory /usr/local/trac-projects/project_name)
# trac-admin /usr/local/trac-projects/project_name initenv
(... answer the questions ...)
# chown -R www-data:www-data /usr/local/trac-projects/project_name

Put the top icon image file in /var/www/trac-resources

Set the top icon in /usr/local/trac-projects/project_name/conf/trac.ini

Converting from Mantis

See this page in this trac manual:

http://projects.edgewall.com/trac/wiki/TracImport