Subversion isn’t only for coders or developers, I have been using it for few years to track the changes on my configuration files, make a central repository for a group of servers. This quick how-to explains how to install and do basic configuration of subversion across Apache on a network.
The first thing to do is to install the required packages…
# yum install httpd mod_dav_svn subversion
Generally the package shipped with CentOS works with the default configuration so I am not going to go deep into apache’s configuration, just make sure apache is running and it works with the system startup…
# service httpd start
# chkconfig httpd on
You could also check if svn module is loaded into apache or not (mine was loaded automatically after installing the package)
# apachectl -M | grep svn
Then we configure the repository (repo for short)
# mkdir /var/svn && cd /var/svn/
# svnadmin create project1
# chown -R apache.apache /var/svn/
The next step is to setup some settings within Apache so Subversion and Apache play nice together.
# vim /etc/httpd/conf.d/subversion.conf
The basic configuration of apache to serve an svn repo is like:
DAV svn
SVNParentPath /var/svn
After that, restart apache, and browse to your repo…
# service httpd restart
Go to http://my.server.hosting.svn/svn/project1
and you should get the version 0 page of your repo
To be continued…