centos环境下svn多资源库配置

#svn版本

subversion-1.8.3

apache+svn+ssl+iF.svnadmin方式多资源库配置

#配置svn多资源库
#------------------------------------------------------------------

#创建svn资源库目录
cd /techcenter/

#资源库1目录
mkdir -p svn/prj

cd svn/

mkdir doc dev

#配置权限,svnadmin管理是需要用到,不配置好权限svnadmin管理时很可能异常报错

chmod -R 777 prj/
chmod -R 777 doc/
chmod -R 777 dev/

#配置svnadmin管理多svn资源库
#------------------------------------------------------------------
#找到svn安装目录data目录

cd /techcenter/web/svnadmin/data/

vi config.ini

#默认配置
[Repositories:svnclient]
SVNParentPath=/techcenter/svn/dev
SvnExecutable=/usr/local/svn/bin/svn
SvnAdminExecutable=/usr/local/svn/bin/svnadmin

#在其下面增加多资源库地址信息,如下:
[Repositories:svnclient:1]
SVNParentPath=/techcenter/svn/doc
Description=doc repos

[Repositories:svnclient:2]
SVNParentPath=/techcenter/svn/prj
Description=prj repos

 
#配置apahce httpd.conf文件
#------------------------------------------------------------------

#修改apache配置
vi /usr/local/apache2/conf/httpd.conf

#资源库1目录,注意svn多资源库的目录
<Location /svn/prj>
DAV svn
SVNParentPath /techcenter/svn/prj
SVNListParentPath On
AuthType Basic
AuthName "svn repos"
AuthUserFile /techcenter/sd/conf/svn_passwdfile
AuthzSVNAccessFile /techcenter/sd/conf/svn_accessfile
Require valid-user
SSLRequireSSL
</Location>

#资源库2目录
<Location /svn/doc>
DAV svn
SVNParentPath /techcenter/svn/doc
SVNListParentPath On
AuthType Basic
AuthName "svn repos"
AuthUserFile /techcenter/sd/conf/svn_passwdfile
AuthzSVNAccessFile /techcenter/sd/conf/svn_accessfile
Require valid-user
SSLRequireSSL
</Location>

#资源库3目录
<Location /svn/dev>
DAV svn
SVNParentPath /techcenter/svn/dev
SVNListParentPath On
AuthType Basic
AuthName "svn repos"
AuthUserFile /techcenter/sd/conf/svn_passwdfile
AuthzSVNAccessFile /techcenter/sd/conf/svn_accessfile
Require valid-user
SSLRequireSSL
</Location>

#重启apache并测试

cd /usr/local/apache2/bin/

ps -ef | grep httpd

./apachectl stop

ps -ef | grep httpd

./apachectl start

ps -ef | grep httpd

#先登录svnadmin配置多资源库账号访问权限
#再打开IE,访问地址用不同账号访问测试
https://IP/svn/prj/

https://IP/svn/doc/

https://IP/svn/dev/

#------------------------------------------------------------------
#配置svn多资源库管理完毕!

相关推荐