Subversion Server Setup

This page explains how an instructor or student could setup a computer named web5.ias.csusb.edu for use as a Subversion server. If you are going to rely on someone else to do this setup, then you only need to read Creating a Subversion Repository under Linux. First, install CentOS according to Base Installation of a CentOS Server. Then, run the following yum command to install various packages.
yum install httpd mod_ssl mod_dav_svn
chkconfig httpd on
All web transactions will be through port 8443 over https. Therefore, open port 8443 according to How to Open a Port. Also, make the following two changes to /etc/httpd/conf.d/ssl.conf.
#Listen 443
Listen 8443

# ...

#<VirtualHost _default_:443>
<VirtualHost _default_:8443>
To enable svn access to user maintained repositories, add the following lines to ssl.conf for each user account (replacing turner with the name of the user account).
<Location /turner>
    DAV svn
    SVNPath /home/turner/repo
    AuthType Basic
    AuthName "Subversion repository"
    AuthUserFile /home/turner/svn-users
    Require valid-user
</Location>
Start apache.
service httpd start
Install nano for students to use who do not want to use vi.
yum install nano

Group-Based Access

Use the following alternative code to restrict access to repository by group.
  <location /turner>
        DAV svn
        SVNPath /home/turner/repo
        AuthType Basic
        AuthName "repository"
        AuthUserFile /home/turner/svn-users
        AuthGroupFile /home/turner/svn-groups
        Require group repo
  </location>
Then, create svn-groups with the following content, assuming that turner and smith are in the svn-users file.
repo: turner smith
Use the following alternative code to restrict write access to repository by group, but allow read access to everyone.
  <location /turner>
        DAV svn
        SVNPath /home/turner/repo
        AuthType Basic
        AuthName "repository"
        AuthUserFile /home/turner/svn-users
        AuthGroupFile /home/turner/svn-groups
         <LimitExcept GET PROPFIND OPTIONS REPORT>
             Require group repo
         </LimitExcept>
  </location>