Trac
Jump to navigation
Jump to search
first we will need to emerge trac and the apache2 mod_python module
sudo emerge -av trac mod_python
now we will need to change the apache2 config file
sudo nano -w /etc/conf.d/apache2
and add
-D PYTHON
to the APACHE2_OPTS line. 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