trac -integrated &
Project Management Configuration in debian
What is Trac?
Trac is an enhanced wiki and issue tracking system for software
development projects. Trac uses a minimalistic approach to
web-based software project management. Our mission; to help
developers write great software while staying out of the way.
Trac should impose as little as possible on a team's established
development process and policies.
It provides an interface to Subversion, an integrated Wiki and
convenient report facilities.
Trac allows wiki markup in issue descriptions and commit
messages, creating links and seamless references between bugs,
tasks, changesets, files and wiki pages. A timeline shows all
project events in order, making getting an overview of the
project and tracking progress very easy.
Download Trac
http://projects.edgewall.com/trac/wiki/TracDownload
Trac Documentation
http://projects.edgewall.com/trac/wiki/TracGuide
Trac faq
http://projects.edgewall.com/trac/wiki/TracFaq
Installing and
Configuring trac in debian
Non-Default packages
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.
Setting up Subversion and Trac in
Debian
From a basic installation of Sarge, you'll need to install
apache2, subversion, trac, and libapache2-svn. If you have
previously installed some portion of these, adapt as needed.
Prerequisites
# apt-get install apache2
# apt-get install subversion
# apt-get install libapache2-svn
# apt-get install trac
Getting Subversion working in Debian
To create a Subversion project at /var/svn/project, issue these
commands to get SVN up and running
Note: As of this writing, the default Subversion package uses
the BDB filesystem; if this is acceptable, feel free to omit the
extra argument to svnadmin create.
# mkdir /var/svn
# mkdir /var/svn/project
# mkdir /tmp/project
# mkdir /tmp/project/branches
# mkdir /tmp/project/tags
# mkdir /tmp/project/trunk
# svnadmin create /var/svn/project --fs-type fsfs
# svn import /tmp/project file:///var/svn/project -m "initial
import"
# rm -rf /tmp/project
Add the following to /etc/apache2/sites-available/default
#SVN dir
<Location /svn>
DAV svn
SVNParentPath /var/svn
SVNAutoversioning on
AuthType Basic
AuthName "SVN - Your Project"
AuthUserFile /etc/apache2/svn.passwd
Require valid-user
</Location>
Fix permissions to the repository
# find /var/svn/project -type f -exec chmod 660 {} \;
# find /var/svn/project -type d -exec chmod 2770 {} \;
# chown -R root.www-data /var/svn/project
Enable installed apache modules
# a2enmod dav
# a2enmod dav_fs
Add Subversion users. Note the different syntax for creating the
first user from creating each additional user.
#cd /etc/apache2
#htpasswd2 -c svn.passwd user1 (you'll be prompted for the
password)
#htpasswd2 svn.passwd user2 (you'll be prompted for the
password)
Restart Apache2.
# apache2 -k restart
Go to http://servername.foo.com/svn/project to see the empty
directories as imported. Do not move on to the next step until
this works correctly
Getting Trac running
These instructions will install a trac environment at /var/trac/project,
without using the mod_python extentions. Initialize the Trac
environment with the following commands:
# mkdir /var/trac
# trac-admin /var/trac/project initenv
# find /var/trac/project -type f -exec chmod 660 {} \;
# find /var/trac/project -type d -exec chmod 2770 {} \;
# chown -R root.www-data /var/trac/project
The trac-admin command above will prompt you to enter the
project name, the path to the trac environment, and the path to
the Trac templates directory; then it printed out a bunch of
stuff.
Next, edit /etc/apache2/sites-available/default. Comment out the
existing ScriptAlias and <Directory "/usr/lib/cgi-bin">
directives. To install trac at a URL like http://servername.foo.com/proj
, add this at the end:
Alias /trac "/usr/share/trac/htdocs"
ScriptAlias /proj /usr/share/trac/cgi-bin/trac.cgi
<Location "/proj">
SetEnv TRAC_ENV "/var/trac/project"
</Location>
<Directory "/usr/share/trac/htdocs">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
# You need something like this to authenticate users
<Location "/proj/login">
AuthType Basic
AuthName "project"
AuthUserFile /var/www/trac.htpasswd
Require valid-user
</Location>
Providing /etc/apache2/svn.passwd in the space above will allow
you to use the same usernames and passwords in both Subversion
and Trac.
If you choose to authenticate seperately, add Trac users, and
restart Apache:
# cd /var/www
# htpasswd2 -c trac.htpasswd user1 (you'll be prompted for the
password)
# htpasswd2 trac.htpasswd bar user2 (you'll be prompted for the
password)
# apache2 -k restart
Finally, test by going to http://servername.foo.com/proj/