本节接着上篇文章继续介绍Apache+SVN权限管理,通过这几个例子的讲解,你就会对Apache+SVN权限管理有更深刻的认识,下面让我们来一起学习吧。
例子:
在IP地址为192.168.2.22的/opt/repository下建test1和test2两个库,权限和用户文档分开管理
步骤如下:
1,建库
svnadmincreate/opt/repository/test1
svnadmincreate/opt/repository/test2
2,配置httpd
Apache+SVN权限管理中,进行相关配置。
<Location/test1>
DAVsvn
SVNPath/opt/repository/test1
AuthTypeBasic
AuthName"Subversionrepositorytest1"
AuthUserFile/opt/repository/testconf/passwd1
AuthzSVNAccessFile/opt/repository/testconf/authz1
Requirevalid-user
Location>
<Location/test2>
DAVsvn
SVNPath/opt/repository/test2
AuthTypeBasic
AuthName"Subversionrepositorytest2"
AuthUserFile/opt/repository/testconf/passwd2
AuthzSVNAccessFile/opt/repository/testconf/authz2
Requirevalid-user
Location>
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
- 18.
解释:
用户访问test1的方式为:http://192.168.2.22/test1
用户访问test2的方式为:http://192.168.2.22/test2
注:
3,则对于库test1来讲用户列表文档为/opt/repository/testconf/passwd1,权限文档为/opt/repository/testconf/authz1。
对于库test2来讲用户列表文档为/opt/repository/testconf/passwd2,权限文档为/opt/repository/testconf/authz2,然后分别修改文件即可。我们目前实际操作用的是方法2,即各个库对应自己的权限文档。本节Apache+SVN权限管理介绍完毕,希望对大家有点用。
【编辑推荐】
- MyEclipse6.0集成SVN及配置详解
- CentOS系统中安装subversion并使用svn+ssh访问
- 基于Java的svn客户端工具JavaSVN 1.1.0.beta发布
- 如何结合使用Subversion和Eclipse
- Subversion日期解析函数缓冲区溢出漏洞