0. Introduction
Install a subversion server using apache service. This server uses digest for password authentication and per-directory access control.
1. Install Apache2 and mod_dav_svn
Don't remember to enable the dav_svn module.
2. Create the subversion repository
$sudo svnadmin create /opt/svn
3. Configure mod_dav_svn
$vi /etc/apache2/mods_available/subversion.conf
<Location /training> DAV svn SVNPath /opt/svn AuthType Digest AuthDigestProvider file AuthName "SVN" AuthUserFile /opt/svn/digest-users Satisfy Any require valid-user AuthzSVNAccessFile /opt/svn/authz </Location> $sudo ln -s /etc/apache2/mods_available/subversion.conf /etc/apache2/mods_enabled/ $sudo ln -s /etc/apache2/mods_available/auth_digest.load /etc/apache2/mods_enabled/
4. Add users
$sudo htdigest -c /opt/svn/digest-users admin
5. Configure the access permission policy
$sudo vi /opt/svn/authz [groups] admins=admin powers=joseph developers=dev1,dev2 [/] @admins=rw *=r [/sandbox] *=rw [/project1] *= @admins=rw @powers=rw @developers=r [/project1/trunk/src] @tdevelopers=rw
6. Reset file owner and restart Apache
$sudo chown www-data:www-data /opt/svn -R $sudo /etc/init.d/apache2 restart
|