yum install subversion apache mod_dav_svn
在此我們不用 daemon mode (svnserve),而是使用 apache 來管理
設定帳密
htpasswd -c /etc/svn/passwd user
設定權限
[groups] admin = user1, user2 [Project1:/] @admin = rw [Project2:/] @admin = rw [Project2:/Doc] user3 = rw
設定apache configuration
/etc/httpd/conf.d/subversion.conf
LoadModule dav_svn_module modules/mod_dav_svn.so LoadModule authz_svn_module modules/mod_authz_svn.so <Location /svn> DAV svn SVNParentPath /var/svn SSLRequireSSL AuthType Basic AuthName "Authorization Realm" AuthUserFile /etc/svn/passwd AuthzSVNAccessFile /etc/svn/authz Require valid-user </location>
建立新的 project
svnadmin create /var/svn/Project1
讓 httpd 有存取 svn 目錄的權限
chown -R apache:apache /var/svn/Project1
最後開啓網址 https://localhost/svn/Project1 試試看
沒有留言:
張貼留言