Installing SVN and Trac on a CentOS 5 server

Posted on March 19th, 2010 in General,Linux System Administration,Programming by Brandon

Make sure that you have the RPMForge repository enabled. Install Subversion, mod_dav_svn, and trac. This will install a few required dependencies (ie: neon and some python utils)

# yum install subversion mod_dav_svn mod_python trac

Create a directory for your repositories, and an initial repository for testing, and create your htpasswd file. Then create a trac environment and set it up.

# mkdir /home/svn/
# svnadmin create testrepo
# chown -R apache:apache /home/svn/*
# htpasswd -c  /home/svn/.htpasswd brandon

#mkdir /home/trac/
# trac-admin /home/trac/ initenv
    ... answer questions as appropriate ...
# chown apache:apache /home/trac/*
# htpasswd -c  /home/svn/.htpasswd brandon

Add this to your Apache configuration in the relevant place (I like to put it under an SSL VirtualHost)

    <Location /svn>
        DAV svn
        SVNParentPath /home/svn/
        #SVNListParentPath on
        # Authentication
        AuthType Basic
        AuthName "RoundSphere SVN Repository"
        AuthUserFile /home/svn/.htpasswd
        Order deny,allow
        Require valid-user
    <Location /trac>
        SetHandler mod_python
        PythonHandler trac.web.modpython_frontend
        PythonOption TracEnv /home/trac
        PythonOption TracUriRoot /trac
        # Authentication
        AuthType Basic
        AuthName “MyCompany Trac Environment"
        AuthUserFile /home/svn/.htpasswd
        Require valid-user

Now test to make sure that you can view your test repository in a browser and that it prompts for a username and password as desired:


You should retrieve a plain looking page that mentions the name of your repository and that it is at Revision 0

You should also be able to access your trac installation at


Customize your logo, change the home page, start making some tickets, using the wiki and get to work.

4 Responses to 'Installing SVN and Trac on a CentOS 5 server'

Subscribe to comments with RSS or TrackBack to 'Installing SVN and Trac on a CentOS 5 server'.

  1. on March 19th, 2010 at 4:33 pm

    […] See more here: Brandon Checketts » Blog Archive » Installing SVN and Trac on a … […]

  2. Derek said,

    on April 16th, 2010 at 10:11 am

    In the trac section

    # htpasswd -c /home/svn/.htpasswd brandon

    should be

    # htpasswd -c /home/trac/.htpasswd brandon

  3. Brandon said,

    on June 13th, 2010 at 8:51 pm


    Thanks, Derek. I’ve corrected that in the example.

  4. on November 29th, 2011 at 4:44 am

    […] Tags: SVN iPhone4 4.3 간단 탈옥 & Iap Crack No comments yet. Cancel […]

Post a comment