No public Twitter messages.

Home About Kalinga Sinhala Unicode Help Sinhala Blog Techකතා සිංහල බ්ලොග් කියවනය (Syndi)

Installing Subversion (SVN) & Trac on CentOS 5.X with Apache

Here’s how to install SVN + Trac with Apache on CentOS 5.x, before you do this you need to login as root.

run the following command to install SVN, SVN Support for Apache, PHP, Apache, MySQL (if your using MySQL with Trac) gcc, Python and Python for Apache and Sqlite (Defualt DB manager for Trac)

yum install subversion mod_dav_svn php httpd mysql gcc python mod_python sqlite
python ./
easy_install babel
easy_install Genshi
easy_install Pygments
easy_install docutils
easy_install textile

above will install the basic stuff to get SVN + Trac running on Apache.

now lets install Python support for MySQL if your using Trac with MySQL go to download MySQL-python-x.x.tar.gz


now unzip the downloaded file

tar xzvf MySQL-python-1.2.3c1.tar.gz

Change to the unzip directory

cd MySQL-python-1.2.3c1

Now lets install MySQL support for python

python build && python install

cd ..

Now lets install Clearsilver, go to download clearsilver-0.x.x.tar.gz and unzip it.

tar xzvf clearsilver-0.10.5.tar.gz

tar xzvf clearsilver-0.10.5.tar.gz

Change to the unzip directory and install clearsilver

cd clearsilver-0.10.5

./configure && make && make install

cd ..

Now lets download trac and install it. Go to and download Trac-0.x.x.tar.gz


tar xzvf Trac-0.11.5.tar.gz

cd Trac-0.11.5

python ./ install

Now lets setup a project call KalingaTest and admin user call kalinga to access it.

Setting up the Project File Location and Directory

mkdir -p /var/svn/repos/KalingaTest

Creating a SVN project

svnadmin create --fs-type fsfs /var/svn/repos/KalingaTest

Creating a Trac Project Directory

mkdir -p /var/trac/KalingaTest

Creating a Trac Project

trac-admin /var/trac/KalingaTest initenv

When creating a trac project, it will ask the following, fill accordingly.

Project Name [My Project]> KalingaTest

if your not using MySQL simply hit enter

Database connection string [sqlite:db/trac.db]>

if your using MySQL you need to provide the MySQL DB, User & Host as

Database connection string [sqlite:db/trac.db]>mysql://dbuser:dbpass@host/dbname
Repository type [svn]> svn
Path to repository [/path/to/repos]> /var/svn/repos/KalingaTest

Setting File/Folder owner to apache

chown -R apache.apache /var/trac
chown -R apache.apache /var/svn

Now lets setup Apache for SVN + Trac, Edit the subversion.conf

vim /etc/httpd/conf.d/subversion.conf
Add the following at the end of the subversion.conf file.
<Location /trac>
SetHandler mod_python
PythonHandler trac.web.modpython_frontend
PythonOption TracEnv /var/trac/KalingaTest
PythonOption TracUriRoot /trac
<Location "/trac/login">
AuthType Basic
AuthName "trac"
AuthUserFile /var/svn/project_passwd
Require valid-user
<Location "/svn/repos/KalingaTest">
DAV svn
SVNPath /var/svn/repos/KalingaTest
AuthType Basic
AuthName "Authorization Realm"
AuthUserFile /var/svn/project_passwd
Require valid-user

Setting up the password file

touch /var/svn/project_passwd

Making the password file apache readable

chown -R root.apache /var/svn/project_passwd

Adding a User to the password File “Kalinga” need to be the users name and the password will be prompted to be entered. You can add multiple users.

htpasswd -m /var/svn/project_passwd kalinga

Adding a user call “kalinga” ad the admin for the project name “KalingaTest”

trac-admin /var/trac/KalingaTest permission add kalinga TRAC_ADMIN

Restarting apache for changes to be applied.

service httpd restart

Go to the following URL for SVN and Trac, password and user name will the one given above.



if you have done every thing right, both should work with out an issue :)


One Response to “Installing Subversion (SVN) & Trac on CentOS 5.X with Apache”

  1. dendy Says:

    hi…thanks for tutorial..nice.
    me from indonesian (bali) you know bali?
    beautiful place.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Bloggers’ Rights at EFF

Bloggers' Rights at EFF

Web Hosting

Creative Commons License

Creative Commons License
This work is licensed