Fast & Security Conscious
High-Availability Unix Hosting

Trac is an easy-to-use wiki and issue tracking system aimed at software development projects. It provides a convenient interface to Subversion. trac is already installed and is supported on our servers. The installation procedure is simple.

Initializing the environment

Use the trac-admin tool to initialize a new trac environment. It can be located anywhere under your ~/www/ tree. You will typically have one trac environment per project.

  $ trac-admin $HOME/www/myproject initenv

trac-admin will ask for:

  • Project Name: (enter any name)
  • Database connection string: (accept default)
  • Path to repository: /home/yourname/path/to/svn-repository
  • Templates directory: (accept default)
Configuring administrator access

Now enter trac-admin's interactive mode, and use the permission add command to configure an administrator:

  $ trac-admin $HOME/www/myproject
  # permission add admins TRAC_ADMIN
  # permission add yourname admins
  # exit

You can use any of the available Apache authentication methods to limit access to your trac. To use basic password authentication, create a password file:

  $ htpasswd -c ~/.htpasswd-myproject yourname
  New password: (password)
  Re-type new password: (password)
Making trac web-accessible

In the ~/www/myproject/ directory, create an .htaccess file specifying your authentication policy. It is possible to limit access based on passwords, client IP addresses, etc. See the .htaccess micro-howto and Apache documentation for more details. For basic password authentication, you would use:

  AuthType Basic
  AuthName "Trac"
  AuthUserFile /home/yourname/.htpasswd-myproject
  Require valid-user
  DirectoryIndex index.cgi

Create a new file named index.cgi in ~/www/myproject/, containing:

#!/bin/sh
TRAC_ENV="/home/yourname/www/myproject"
export TRAC_ENV
exec /usr/local/share/trac/cgi-bin/trac.cgi

Finally, give index.cgi execute permissions:

  $ chmod 700 ~/www/myproject/index.cgi

Your trac should now be accessible from the web.

Links

  End Software Patents!