For Trac you need a subversion installation and sqlite or postgres as a database. For web access the apache web server can be used.
First you need to create one or more subversion repositories. The default location on SUSE Linux is /srv/svn/repos
. To create a repository named MyProject you must run:
snvadmin create /srv/svn/repos/MyProject
To make the repositry accessible via the netowrk you must either run the svnserve
daemon or enter a corresponding section in /etc/apache2/conf.d/subversion.conf
and run the apache2 daemon (see /usr/share/doc/packages/subversion/README.SuSE
for details).
Now you may create a corresponding for each subversion project the default directory
for Trac projects is /srv/trac/
. To create a new Trac project you must run
trac-admin /srv/trac/MyProject initenv
Now you are asked for the project name, the database, the subversion repository path and a template path. For the database and the template directory the defaults are usually sufficient.
The command above will create the /srv/trac/MyProject
directory and fill it with content. Note that it must be readable and writable by the user the trac
daemon will be running as (see below). With the default options (running as wwwrun
), you must also do the following after the trac-admin
command above:
chown -R wwwrun /srv/trac/MyProject
The Trac daemon can be started with rctracd start
. To activate it permanently you must run chkconfig --add tracd
. The default port for the Trac daemon is 8080. This and the trac directory can be changed in /etc/sysconfig/tracd
. To use ports below 1000 the TRAC_UID
must be changed to root.
To use Trac using Apache and CGI it is neccessary to add the env
module to the APACHE_MODULES
variable in /etc/sysconfig/apache2
. Then you must activate CGI access to trac by adding TRAC_CGI
to APACHE_SERVER_FLAGS
.
Access to Trac via mod_python is configured in a similar way. You must add python
to
APACHE_MODULES
and TRAC_MODPYTHON
to APACHE_SERVER_FLAGS
.