一、安裝包
yum install subversion apr apr-util mod_dav_svn httpd
二、配置SVN
mkdir -p/svn/VER
svnadmin create /svn/VER
檢視目錄下面是不是有檔案,然後進行配置
1、 vi svnserve.conf
anon-access = none
auth-access = write
password-db = passwd
authz-db = authz
realm = VER
2、vi authz
#[/]
#@admin = rw
[VER:/]
@manager = rw
* =
3、vi passwd
[users]
# harry =harryssecret
# sally =sallyssecret
admin = admin
啟動SVN
svnserve -d -r /svn/
三、配置httpd
vi /etc/httpd/conf.d/subversion.conf
<Location/svn>
DAV svn
SVNPath /svn/VER
# Limit write permission to list of validusers.
# <LimitExcept GET PROPFIND OPTIONSREPORT>
# Require SSL connection for passwordprotection.
# SSLRequireSSL
AuthType Basic
AuthName "Authorization Realm"
AuthUserFile /etc/httpd/conf.d/passwd
Require valid-user
# </LimitExcept>
</Location>
chown-R apache.apache/svn/VER
檢視是不是有相應子產品
ls/etc/httpd/modules/ | grep svn
mod_authz_svn.so
mod_dav_svn.so
httpd加使用者
htpasswd-cm passwd admin
三、測試