随笔-18  评论-8  文章-0  trackbacks-0

创建

  1. mkdir /etc/svn/repos1
  2. svnadmin create /etc/svn/repos1
  3. svn import file:///etc/svn/repos1  --message "init" // 导入当前目录下所以文件
    svn import /local/mydir/ file:///etc/svn/repos1  --message "init" // 导入指定目录下所以文件

查看

  • svn list --verbose file:///etc/svn/repos1/
  • svnlook info /etc/svn/repos1/
  • svnlook tree /etc/svn/repos1/ --show-ids

Apache权限控制

${apache}/conf/httpd.conf 的配置:
LoadModule dav_svn_module     modules/mod_dav_svn.so
LoadModule authz_svn_module   modules
/mod_authz_svn.so
<Location /svn/>
DAV svn
SVNParentPath 
/etc/svn/repos1
SVNListParentPath on

AuthType Basic
AuthName 
"MY SVN Repository"
AuthUserFile 
/etc/svn/repos1/passwd.conf
AuthzSVNAccessFile 
/etc/svn/repos1/authz.conf
Require vaild-user
</Location>

创建用户和密码:${apache}/bin/htpasswd /etc/svn/repos1/authz.comf user1

authz.conf的配置:
[groups]
group1 
= user1
group2 
= user1,user2

[
/]
* = r

[project1
:/path1]
@group1 = rw

[project1
:/path2]
@group2 = rw

取出:svn co file:///etc/svn/report1

另外需要修改两个地方,不然无法提交修改的文件:

  1. chown -R sysuser:sysuser /etc/svn/report1
    chmod -R 700 /etc/svn/report1
  2. 在${apache}/conf/httpd.conf中找到:
    User daemon
    Group daemon
    改为
    User sysuser
    Group sysuser
    以root用户启动apache后,自动切换到sysuser身份运行
posted on 2006-12-21 13:38 阿姆斯壮 阅读(641) 评论(0)  编辑  收藏 所属分类: Linux

只有注册用户登录后才能发表评论。


网站导航: