Subversion repositories with associated Trac projects.
There are many guides and plenty of help on the net to help you setup such a system. However, when I tried to do it I came across a few problems and I hope this post may help at least a few people trying to do the same as me. I am not going to rewrite the great tutorials out there, I will just point you to them and note what things I did differently.
This ‘guide’ should get you from a fresh install of CentOS 5 linux to one or more working Subversion (SVN) repositories and associated Trac wiki’s. Apache/WebDAV is used as the network layer. I have only tested this on a fresh install of CentOS 5.
The EnvironmentI am aiming for the following:
How I did itNot all the steps are vital (probably) but this is how I got it working. Feel free to skip any non-relevant steps (i.e. there is probably no need for a fresh install). Replace any occurence of
1. Fresh install of CentOS. I followed most of the Perfect Setup Guide, except the mail and ISPConfig stuff. The important part is setting up the Apache2 web server.
2. Make sure SVN and mod_dav_svn are installed. As root:
yum install subversion mod_dav_svn
vim /etc/httpd/conf/httpd.confIf the following two lines are not present, add them:
LoadModule dav_svn_module modules/mod_dav_svn.so LoadModule authz_svn_module modules/mod_authz_svn.so3. Install Trac: Follow Nick’s guide with the alternative Clearsilver installation below. Skip the Apache Configuration part.
Follow all of parts 1 and 2. Instead of part 3 do:
wget http://dag.wieers.com/rpm/packages/clearsilver/clearsilver-0.10.4-1.el5.rf.i386.rpm rpm -i clearsilver-0.10.4-1.el5.rf.i386.rpm wget http://dag.wieers.com/rpm/packages/clearsilver/python-clearsilver-0.10.4-1.el5.rf.i386.rpm rpm -i python-clearsilver-0.10.4-1.el5.rf.i386.rpmContinue with parts 4.1 and 4.2 of Nick’s guide. Remember, leave out Apache configuration section.
4. Create your first SVN Repository:
svnadmin create --fs-type fsfs /srv/svn/5. Initialise a Trac project for your new repository:
trac-admin /srv/trac/For the trac-admin command use the defaults if not sure, giving a descriptive name for the project. The `Path to repository` is: /srv/svn/
6. Set the correct file permissions for apache
chown -R apache.apache /srv/svn/7. Tell apache where to find the new repository. Here we create an additional Apache configuration file specifically for the SVN repositories.
vim /etc/httpd/conf.d/subversion.confAdd the following directive:
8. Add a repository user:
touch /srv/svn/9. Create the Access Control List for the SVN Repository
vim /srv/svn/svn-acl-confAdd the following directives:
10. Tell apache where to find the new Trac project. Here we create an additional Apache configuration file specifically for the Trac projects.
vim /etc/httpd/conf.d/trac.confAdd the following directives:
11. Add a Trac user:
touch /srv/trac/12. Give admin permissions to the Trac user you just created:
13. Restart Apache:
service httpd restartYou should now have SVN and Trac installed. You will have an SVN repository setup (http://server/svn/
Please let me know if this helped you. If you come across any problems I will be happy to try and help.
Official guide: http://svnbook.red-bean.com/nightly/en/svn.serverconfig.httpd.html
Here is a good place to start: http://www.daniel-skinner.co.uk/setup-subversion-and-trac-on-centos-5/06...
Wednesday, February 17, 2010
Category: Subversion — SkyHi @ Wednesday, February 17, 2010