环境:
- centos7
- svn # subversion
- ldap # 接入现有的统一认证接口
- lvm # 增加虚拟机逻辑卷磁盘空间
- apache # 扩展svn模块
openldap
http://list.attacker.club/scripts/shell/ServicesDeployment/openldap/openldap-install.sh
svn
服务部署
代码语言:javascript复制yum -y install subversion
mkdir /home/svn
svnserve -d -r /home/svn # 启动svn服务
svnadmin create /home/svn/product
svnadmin create /home/svn/design
svnadmin create /home/svn/develop
svnadmin create /home/svn/test
svnadmin create /home/svn/ops
# 创建研发部门各团队
chown apache.apache -R /home/svn/ #文件夹授权
svn授权策略
/home/svn/authz
代码语言:javascript复制[groups]
admin=jingjing,maxxx
dev=wangxxx
test=yuxxxx
des=tanxxx
[/]
@admin = rw
[product:/]
@dev = r
[develop:/]
@dev = rw
[test:/]
@test = rw
@dev = r
apache
安装Apache
代码语言:javascript复制yum -y install mod_ldap httpd # ldap模块
systemctl enable httpd && systemctl start httpd
httpd配置文件
代码语言:javascript复制cp /etc/httpd/conf.modules.d/10-subversion.conf /etc/httpd/conf.d/subversion.conf
# subversion.conf模板
/etc/httpd/conf.d/subversion.conf
代码语言:javascript复制LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
LoadModule dontdothat_module modules/mod_dontdothat.so
<Location />
DAV svn
SVNParentPath /home/svn
SVNListParentPath On
AuthzSVNAccessFile /home/svn/authz
AuthBasicProvider ldap
AuthType Basic
AuthName "Subversion repository"
AuthLDAPURL "ldap://47.99.66.xxx:389/dc=ops,dc=net?uid?sub?(objectClass=*)"
AuthLDAPBindDN "cn=root,dc=ops,dc=net"
AuthLDAPBindPassword "xxxxxx"
Require valid-user
</Location>
浏览器访问 - 集合(根)
http://10.0.1.111/ ip或者域名
svn配置自己的仓库
右键
checkout 自己所在的版本仓库