1. yum install httpd (apt-get install apache2)
make the httpd autostart
2. yum install subversion
do not need to start the svnserve deamon, we use httpd to supply the service through DAV.
3. yum install mod_dav_svn (apt-get install libapache2-svn)
this will install the mod_dav_svn.so, mod_authz_svn.so and subversion.conf
4. create repository by svnadmin create
mkdir /var/www/subversion cd /var/www/subversion svnadmin create repos
5. create the password file by htpasswd
cd /var/www/subversion htpasswd -c passwd admin
6. configure svn authorization file in /var/www/subversion/authz
refer to the file in repository/conf/authz.
[/] admin = rw
7. configure apache site configuration file: subversion.conf
#LoadModule dav_svn_module modules/mod_dav_svn.so
#LoadModule authz_svn_module modules/mod_authz_svn.so
<VirtualHost *:80>
ServerName svn.johnsonlau.net
ServerAdmin gatement@gmail.com
<Location "/repos">
DAV svn
#SVNParentPath /var/www/subversion/
SVNPath /var/www/subversion/repos
AuthType Basic
AuthName "Authorization Realm"
AuthUserFile /var/www/subversion/passwd
AuthzSVNAccessFile /var/www/subversion/authz
Require valid-user
</Location>
</VirtualHost>
8. backup repository by svnadmin hotcopy.
svnadmin hotcopy --clean-logs /var/www/subversion/repos targetfolder