Monday, August 17, 2009

Setting up trac with svn in Debian


1) Installing trac and apache2 and svn
apt-get install trac apache2 libapache2-mod-wsgi subversion

2) Creating trac projecs
NOTE: here my_project is the project name

mkdir /var/lib/trac
trac-admin /var/lib/trac/my_project initenv

3) Testing trac
tracd --port 8000 /var/lib/trac/my_project
Then open with browser http://localhost:8000

4) Deploying project in web (apache)
trac-admin /var/lib/trac deploy /var/www/trac

5) Apache2 configuration for the project
Create a file /etc/apache2/sites-enabled/trac_svn and add following to that file

WSGIScriptAlias /trac /var/www/trac/my_project/cgi-bin/trac.wsgi

<Directory /var/www/trac/cgi-bin>
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all

6) Testing the depoyment
Open with browser http://localhost/trac/my_project

7) Setting up svn project
mkdir -p /var/lib/svn/my_project
svnadmin create /var/lib/svn/my_project

8)Adding Users (through apache digest authentication)
NOTE: Here user_name is your user name

i) Enabling digest auth module
cd /etc/apache2/mods-enabled
ln -s ../mods-available/auth_digest.load

ii) Adding user to htpassword file ( Use -c for the first time only)
htdigest -c /etc/trac/htpasswd my_project user_name

iii)Add following to /etc/apache2/sites-enabled/trac_svn

<Location "/trac/login">
AuthType Digest
AuthName "my_project"
AuthDigestDomain /trac/my_project
AuthUserFile /etc/trac/htpasswd
Require user user_name

iv)Setting access level in trac
trac-admin /var/lib/trac permission add user_name TRAC_ADMIN
trac-admin /var/lib/trac permission list

9) Adding plugins to trac
download the file and remove the .zip extension and run
easy_install --always-unzip TracWebAdmin-0.1.2dev_r4240-py2.3.egg


  1. This comment has been removed by the author.

  2. Hi nayanajith,
    I'm Tharindu. I'm really sorry for posting this irrelevant comment for this article.
    But I need your help badly. I'm trying to use Kannel Gateway to send SMSs. I read ur posts regarding Kannel. Im also hoping to use E220 modem. So I want to know how did you use it with Linux. Did u use a driver. And also is it necessary to unlock it and can we use the same sim we use to access internet.
    Also it would be grate if you can mention about the configuration of the modem for Kannel..
    Thanx a lot in advance..