# yum install mod_dav_svn subversion
Configure Apache
#vi /etc/httpd/conf/httpd.conf
LoadModule dav_module modules/mod_dav.so
Configure subversion
# vi /etc/httpd/cond.d/subversion.conf
LoadModule dav_svn_module /usr/lib/httpd/modules/mod_dav_svn.so
LoadModule authz_svn_module /usr/lib/httpd/modules/mod_authz_svn.so
...
DAV svn
SVNParentPath /home/svn
< Location /repos>
DAV svn
SVNParentPath /home/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 /path/to/passwdfile
# Require valid-user
# Deny from all
# Allow from 192.168.
#
< /Location>
Create repos
# mkdir /home/svn
# svnadmin create /home/svn/Test
# chown -R apache:apache /home/svn/Test
Restart the apache
# service httpd reload
Note:
SVNPath: for single svn project
SVNParentPath: for multiple svn project
If you use SVNParentPath, you should access sub-svn from the browser, or you will get
------------------------------------------------------------
Forbidden
You don't have permission to access /repos on this server.--------------------------------------------------------------------------------------
You should access them by http://localhost/repos/sub-svn
p.s.
Create basic auth
htpasswd -c /path/to/passwdfile svn-admin
IP permisison
Order Deny,Allow
Deny from all
Allow from 192.168.10.126
No comments:
Post a Comment