Scientific Linux 6
Sponsored Link

Subversion - Server Settings2011/06/04

 
Install Subversion that is the software for version control.
For this example, Use Subversion with WebDAV function, so httpd is required and SSL settings is also done.
[1] Install and Configure Subversion.
[root@www ~]#
yum -y install subversion mod_dav_svn
[root@www ~]#
vi /etc/httpd/conf.d/subversion.conf
# line 26-40: uncomment and change like follows

<Location /repos>
   DAV svn
   SVNParentPath /var/www/svn
# # Limit write permission to list of valid users.
   <LimitExcept GET PROPFIND OPTIONS REPORT>
      # Require SSL connection for password protection.
      SSLRequireSSL
      AuthType Basic
      AuthName "Authorization Realm"
      AuthUserFile
/etc/httpd/conf/.htpasswd

     
# specify access control file

     
AuthzSVNAccessFile /etc/svnusers

      Require valid-user
   </LimitExcept>
</Location>
[root@www ~]#
vi /etc/svnusers
# set access right like an example below

[site:/]
# all users are writable

* = rw
# fermi is writable

[site:/directory]
fermi = rw
# userB is readable

userB = r
# userC is not permitted

userC =
[root@www ~]#
mkdir -p /var/www/svn/site

[root@www ~]#
svnadmin create /var/www/svn/site
 
# create a repository

[root@www ~]#
chown -R apache. /var/www/svn

[root@www ~]#
htpasswd -c /etc/httpd/conf/.htpasswd fermi
 
# add a user

New password:
# set password

Re-type new password:
Adding password for user fermi
[root@www ~]#
/etc/rc.d/init.d/httpd restart

Stopping httpd:
[ OK ]

Starting httpd:
[ OK ]

Matched Content