Monday, January 25, 2010

Setting-up the development infrastructure 2 - Subversion

Installing Subversion is straightforward. With Fedora-Core 11 (FC11), we could install the necessary packages via yum:
$ yum install subversion mod_dav_svn

The package mod_dav_svn is needed for accessing Subversion repositories via Apache.

After the installation, we decided to have the Subversion repositories under /home/svn. We created one repository for our project:
$ cd /home/svn
$ svnadmin create our-project


Making Subversion repositories accessible via Apache


To make the repository accessible via Apache, we first had to configure Apache accordingly. The repository, and all future ones respectively, should be accessible via http://our-domain.org/svn/*. So, we had to configure a location in the default virtual host (/etc/http/conf.d/vhost.conf):
<VirtualHost *:80>
...
<Location /svn>
DAV svn
SVNParentPath /home/svn
AuthType Basic
AuthName "Subversion Repositories"
AuthUserFile /etc/subversion/svn-users
Require valid-user
</Location>
</VirtualHost>


The user passwords in the file /etc/subversion/svn-users are created with htpasswd.

To let Apache access the Subversion repository, we had to change the permissions of the corresponding directory:
$ cd /home/svn
$ chown -R apache:apache our-project

Since we did these steps, we can browse the repository via http://our-domain.org/svn/our-project.

No comments:

Post a Comment