$ svnadmin create /home/svn/repo/svn
Install RPM mod_dav_svn
$ yum install mod_dav_svn
Config who can access the repository and their permissions (r or w) /home/svn/conf/users-access-file
[/]
gulden = rw
other = r
[/privaterepo]
*=
- "gulden" user can access the the "/" repository with read and wright (rw) permissions
- "other" can access the the "/" repository with read (r) permission
- No one can access the "/privaterepo" repository
Create the Users password file
$ htpasswd /home/svn/conf/passwd gulden
Edit Apache configuration file: /etc/httpd/conf.d/subversion.conf
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
ServerName myhost.com
ServerAlias svn.myhost.com
Order allow,deny
Allow from all
DAV svn
SVNParentPath /home/svn/repo
# our access control policy
AuthzSVNAccessFile /home/svn/conf/users-access-file
# try anonymous access first, resort to real
# authentication if necessary.
Satisfy Any
Require valid-user
# how to authenticate a user
AuthType Basic
AuthName "My Subversion repository"
AuthUserFile /home/svn/conf/passwd
Checkout a project
$ svn co https://svn.myhost.com/svn/foo/trunk
No comments:
Post a Comment