本站首页    管理页面    写新日志    退出


«August 2025»
12
3456789
10111213141516
17181920212223
24252627282930
31


公告
 本博客在此声明所有文章均为转摘,只做资料收集使用。

我的分类(专题)

日志更新

最新评论

留言板

链接

Blog信息
blog名称:
日志总数:1304
评论数量:2242
留言数量:5
访问次数:7575710
建立时间:2006年5月29日




[Subversion]Debian下配置使用Subversion版本控制服务器[转]
软件技术

lhwork 发表于 2006/8/11 10:02:11

假定条件:我们将我们所有的项目都放在/var/lib/svn目录下,我们要创建foo这个项目,项目的使用人员有张三(zhangs)和李四(lis),张三(zhangs)是领导,只负责审查审查(只读),不用修改,李四(lis)是苦工,什么都要干(读写)。1,首先当然是安装apache2和subversion。apt-get install libapache2-svn apache2-mpm-prefork subversion(这儿选用apache2-mpm-prefork的理由是当前在Debian中只有这个版本可以使用php4)2,创建一个项目svnadmin create /var/lib/svn/foo因为我们是要由apache2来提供服务,所以将目录权限改成是apache2运行时用户www-data:chown www-data.www-data /var/lib/svn/foo -R3,配置apache2编辑/etc/apache2/mods-available/dav_svn.conf,使之如下:# dav_svn.conf - Example Subversion/Apache configuration## For details and further options see the Apache user manual.# <Location URL> ... </Location># URL controls how the repository appears to the outside world.# In this example clients access the repository as http://hostname/svn/repos<Location /svn> # uncomment this to enable the repository   DAV svn # set this to the path to your repository   SVNParentPath /var/lib/svn   SVNIndexXSLT "/svnindex.xsl" # The following allows for basic http authentication. Basic authentication # should not be considered secure for any particularly rigorous definition of # secure. # to create a passwd file # # rm -f /etc/apache2/dav_svn.passwd # # htpasswd2 -c /etc/apache2/dav_svn.passwd dwhedon # New password: # Re-type new password: # Adding password for user dwhedon # # # Uncomment the following 3 lines to enable Basic Authentication   AuthType Basic   AuthName "Subversion Repository" # AuthLDAPEnabled on # AuthLDAPURL ldap://localhost/ou=Users,dc=sczfcpa,dc=com?uid?one   AuthUserFile /etc/apache2/dav_svn.passwd # Uncomment the following line to enable Authz Authentication   AuthzSVNAccessFile /etc/apache2/dav_svn.authz # Uncomment the following three lines allow anonymous read, but make # committers authenticate themselves # <LimitExcept GET PROPFIND OPTIONS REPORT>   Require valid-user # </LimitExcept></Location>修改访问权限的配置文件/etc/apache2/dav_svn.authz(/etc/apache2/mods-available/dav_svn.conf指定的),使之如下:[foo:/]* =zhangs = rlis = rw然后在添加用户到 /etc/apache2/dav_svn.passwdhtpasswd2 -c /etc/apache2/dav_svn.passwd zhangs(输入密码)htpasswd2 -c /etc/apache2/dav_svn.passwd lis(输入密码)apache2的监听端口在 /etc/apache2/ports.conf 里面设置,我设置的81,这样可以不影响现有的apache 1.3现在可以试试用 http://localhost:81/svn/foo 来访问了。


阅读全文(2288) | 回复(0) | 编辑 | 精华
 



发表评论:
昵称:
密码:
主页:
标题:
验证码:  (不区分大小写,请仔细填写,输错需重写评论内容!)



站点首页 | 联系我们 | 博客注册 | 博客登陆

Sponsored By W3CHINA
W3CHINA Blog 0.8 Processed in 0.047 second(s), page refreshed 144751413 times.
《全国人大常委会关于维护互联网安全的决定》  《计算机信息网络国际联网安全保护管理办法》
苏ICP备05006046号