首先是安装svn
yum install -y subversion
相应的配置单自己百度一下吧
安装apache及相应配置
1 安装Apache
yum install httpd
设置开机启动
chkcofing httpd on
启动Apache
service httpd start
查看Apache版本
httpd -version
2 安装Apache支持服务
yum install mod_dav_svn mod_auth_mysql
查看是否安装成功
cd /etc/httpd/modules/
如果有mod_dav_svn.so 和 mod_authz_svn.so模块,如果有,则说明mod_dav_svn安装成功
3 配置http协议认证文件
htpasswd -dc /var/svn/svntest/http_passwd username
4 设置Apache配置与文件
vi /etc/httpd/conf.d/subversion.conf
方式一: 单库统一权限配置 (缺点:其他库权限不好控制,优点:只要一个配置)
http://192.168.1.100:(apache端口)/svn/(SVNParentPath下的库名字)
例子:http://192.168.1.100:10000/svn/server
<Location /svn>
DAV svn
SVNParentPath /var/svn/
AuthType Basic
AuthName "Authorization SVN"
AuthzSVNAccessFile /var/svn/server/conf/authz
AuthUserFile /var/svn/http_passwd
Require valid-user
</Location>
方式二 : 多库多版权限配置 (缺点:每次新加都要配置 优点:权限管理清晰)
http://192.168.1.100:(apache端口)/server/
例子:http://192.168.1.100:10000/server/
<Location /server> // 这里表示:ip + server
DAV svn
SVNPath /var/svn/server/
AuthType Basic
AuthName "Authorization SVN"
AuthzSVNAccessFile /var/svn/server/conf/authz
AuthUserFile /var/svn/http_passwd
Require valid-user
</Location>
<Location /cleint>
DAV svn
SVNPath /var/svn/cleint/
AuthType Basic
AuthName "Authorization SVN"
AuthzSVNAccessFile /var/svn/client/conf/authz
AuthUserFile /var/svn/http_passwd
Require valid-user
</Location>
8185

被折叠的 条评论
为什么被折叠?



