Trac

From gr0x0rd
Jump to navigation Jump to search

There are many issue tracking systems out there, but if you are working on any software projects you'll probably want one. This guide focuses on using Trac, since it integrates nicely with php and mySQL. First check your /etc/portage/package.use file to enable the following USE flags:

www-apps/trac subversion mysql -sqlite

Next we will need to emerge trac and the apache2 mod_python module.

$ sudo emerge -av trac mod_python

Change the apache2 config file

$ sudo nano -w /etc/conf.d/apache2 

And ensure the APACHE2_OPTS variable contains the directive

-D PYTHON 

Next we will need to setup trac. Simply go with defaults.

$ sudo trac-admin /var/lib/trac/my_trac initenv 

next we will need to set directory permissions on the appropriate files and folders.

sudo chown -R apache:apache /var/lib/trac

sudo chown -R apache:apache /var/www/localhost/htdocs/trac

now we set up the trac to use our default svn authorization file for connections and restart apache.

sudo nano -w /etc/apache2/modules.d/16_mod_python.conf

       <LocationMatch "/trac">
               SetEnv PYTHON_EGG_CACHE /var/lib/trac/.egg-cache
               SetHandler mod_python
               PythonHandler trac.web.modpython_frontend
               PythonOption TracEnv /var/lib/trac/my_trac
               PythonOption TracUriRoot /trac/
       </LocationMatch>
       <LocationMatch "/trac/login">
               AuthType Basic
               AuthName "Trac Server"
               AuthUserFile /var/svn/conf/svnusers
               Require valid-user
       </LocationMatch>

sudo /etc/init.d/apache2 graceful