Subversion

Administrator's Guide

Release 5.0

March 2007


Table of Contents

Preface
1. Installation
1.1. Download and Build
1.2. Install
1.3. Configuration

Preface

Subversion is an open source application for revision control. Also commonly referred to as svn or SVN, Subversion is designed specifically to be a modern replacement for CVS and shares a number of the same key developers.

The Subversion web site carries details on the latest release and other information to make your work or play with Subversion more productive. And The mailing lists are a good place to have your questions answered, to share experiences with other users, and to contact the developers.

Chapter 1. Installation

1.1. Download and Build

Before this step, you must install apr, apr-util and apache. Download and save source archive from http://subversion.tigris.org

cd /usr/local/src
wget http://subversion.tigris.org/downloads/subversion-X.X.X.tar.gz
wget http://subversion.tigris.org/downloads/subversion-deps-X.X.X.tar.gz
tar xzf subversion-X.X.X.tar.gz
tar xzf subversion-deps-X.X.X.tar.gz
apt-get install libneon25-dev libexpat1-dev
./configure --prefix=/usr/local/subversion-X.X.X --with-apxs=/usr/local/apache/bin/apxs --without-berkeley-db --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr --with-ssl
make
make install

1.2. Install

Install binaries and create required symbolic links.

cd /usr/local
ln -s subversion-X.X.X subversion
mkdir /var/local/subversion

Compile apache mod_dav if not enable

cd /usr/local/src
wget httpd-version.tar.gz
tar xzf httpd-version.tar.gz
./configure --with-apxs=/usr/local/apache/bin/apxs --enable-dav=shared
make
cp ./modules/dav/main/.libs/mod_dav.so /usr/lib/apache/modules

Edit /etc/apache/conf/httpd.conf, and check this lines :

LoadModule dav_module     modules/mod_dav.so
LoadModule dav_svn_module     modules/mod_dav_svn.so
LoadModule authz_svn_module   modules/mod_authz_svn.so

1.3. Configuration

Create a repository

svnadmin create /var/local/subversion/REPO
chown -R apache /var/local/subversion/REPO

Register repository in apache configuration :

<VirtualHost *:80>
 ServerAdmin support-unix@fr.colt.net
 DocumentRoot /srv/www
 ServerName REPO
 ErrorLog "|/usr/bin/cronolog /var/log/apache/REPO/%Y%m%d-error_log"
 CustomLog "|/usr/bin/cronolog /var/log/apache/REPO/%Y%m%d-access_log" combined
 Options -Indexes
 
 <Location / >
  DAV svn
  SVNPath /var/local/subversion/REPO
  AuthType Basic
  AuthName "REPO NAME - Subversion Repository"
  AuthUserFile /etc/apache/conf/secure/svnpwd
  AuthzSVNAccessFile /etc/apache/conf/secure/REPO-dav_svn.authz
  Require valid-user
 </Location>  

</VirtualHost>

After, we must create standard htpassd file /etc/apache/conf/secure/svnpwd and access rights file /etc/apache/conf/secure/REPO-dav_svn.authz, in example :

[groups]
svn-admin = xavierm,jeromeb
conf-commiters = xavierm,jeromeb

[/]
@svn-admin = rw
@conf-commiters = rw

#[/:/path]
#@conf-commiters = rw