MoobyFR's blog

Some IT infos

Aller au menu | Aller à la recherche

Trac and svn

, 09:58 - Lien permanent

How to generave very fast a new project with trac and svn ?

How to generave very fast a new project?

create the project directory:
mkdir -p /home/trac/myProject/svn

initialise the svn repo (use fsfs for NFS):
svnadmin create --fs-type fsfs /home/trac/myProject/svn

initialise the trac:
trac-admin /home/trac/myProject/trac initenv "My project" /home/trac/project/svn /usr/share/trac/templates

The rights on the sqlite have to be fixed first (root perms needed):
chown www-data /home/trac/myProject/trac/db{,/trac.db}"
chown www-data /home/trac/myProject/svn/db/*
chmod -R g+w /home/trac/myProject/svn/db

add the following in a httpd config file (I use kerberos for authz, change for your need)

<Location /projects/myProject> 
SetHandler mod_python
PythonHandler trac.ModPythonHandler
PythonOption TracEnv /home/trac/myProject/trac
PythonOption TracUriRoot /projects/myProject
<Location "/projects/myProject/login">
AuthType  Kerberos
KrbServiceName HTTP
Krb5Keytab "/etc/apache2/krb5/HTTP.keytab"
KrbMethodNegotiate on
KrbMethodK5Passwd on
require valid-user

To manage a large set of projects, each config file is generated automatically, and is stored in /etc/apache2/sites-enabled/trac-projects/
and the main site-enabled config file has only
Include /etc/apache2/sites-enabled/trac-projects/*.conf