yum install -y httpd subversion mod_dav_svn
mkdir -p /var/lib/svn
cd /var/lib/svn
svnadmin create devops
chown -R apache:apache devops
selinux开启(关闭也可以)
chcon -R -t httpd_sys_content_t devops
setsebool httpd_unified=1
cd /var/lib/svn/devops/conf
anon-access = none
auth-access = write
password-db = passwd
authz-db = authz
mv passwd passwd.default
htpasswd -cm passwd yourname
htpasswd -m passwd myname
[groups]
devops = yourname,myname
[/]
@devops = rw
[/system]
@devops = rw
[/vnetoss]
@devops = r
yourname = rw
cd /etc/httpd/conf.d
touch svn.conf
<Location /devops>
DAV svn
#SVNParentPath /var/lib/svn
SVNPath /var/lib/svn/devops
# 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 /var/lib/svn/devops/conf/passwd
AuthzSVNAccessFile /var/lib/svn/devops/conf/authz
Satisfy all
Require valid-user
#</LimitExcept>
</Location>
systemctl enable httpd
systemctl start httpd
firewall-cmd --permanent--add-service=http
firewall-cmd --reload