1. Install httpd
# yum -y install httpd
# service httpd start
# chkconfig httpd on
2. Install subversion
# yum -y install subversion mod_dav_svn
# mkdir /var/local/svn
3. Configure subversion
# vi /etc/httpd/conf.d/subversion.conf
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
DAV svn
SVNParentPath /var/local/svn
</Location>
4. Create on repos
# svnadmin create /var/local/svn/sample
# chown -R apache:apache /var/local/svn/sample
5. Confirm the repos
Browser
http://example.com/repos/sample/
Output
repos - Revision 0: /
6. Ip permission
# vi /etc/httpd/conf.d/subversion.conf
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
DAV svn
SVNParentPath /var/local/svn
+ Order deny,allow
+ Deny from all
+ Allow from xx.xx.xx.xx
</Location>
7. Basic authentication
# vi /etc/httpd/conf.d/subversion.conf
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
DAV svn
SVNParentPath /var/local/svn
+ AuthType Basic
+ AuthName "Authorization Realm"
+ AuthUserFile /etc/httpd/passwd/svn-users
+ Require valid-user
</Location>
8. Create authentication file
# htpasswd -c /etc/httpd/passwd/svn-users svn-user-name