centos svn服务器搭建

centos svn服务器搭建
1yum  install  subversion
2mkdir -p /opt/svn
3chmod R 777 /opt/svn
4、svnadmin create /opt/svn/repos #创建一个svn版本仓库repos
5、cd /opt/svn/repos/conf
6cp -p svnserve.conf ./svnserve.conf.bak 备份一下即将修改的文件
7vi svnserver.conf
8、
anon-access = none #匿名用户禁止访问
auth-access = write 
password-db = passwd #密码文件
authz-db = authz #认证文件
realm = repos #仓库
9vi authz
[groups]
# harry_and_sally = harry,sally
# harry_sally_and_joe = harry,sally,&joe

# [/foo/bar]
# harry = rw
# &joe = r
# * =

# [repository:/baz/fuz]
# @harry_and_sally = rw
# * = r

repos = zhoutingze,yuanlei
[/]
@repos = rw
zhoutingze = rw
yuanlei = rw
* = r
10vi passwd
[users]
# harry = harryssecret
# sally = sallyssecret
zhoutingze = 123456
yuanlei = 12345678
11、svnserve -d -r /opt/svn/repos #启动svn版本库
12、svn checkout svn://120.25.238.000

13、多库管理,将多个库放到/opt/svn目录下
 先停止killall svnserve
 cd /opt/svn
 cp -p repos/conf/authz ./authz
 cp -p repos/conf/passwd ./passwd
 cd repos/conf
 vi svnserve.conf
 password-db = /opt/svn/passwd #密码文件
 authz-db = /opt/svn/authz #认证文件
 vi /opt/authz
   [groups]
    repos = zhoutingze,yuanlei
   [repos:/]
    @repos = rw
    zhoutingze = rw
    yuanlei = rw
    * = r
 svnserve -d -r /opt/svn/ #注意这里,没有repos文件夹了
 svn checkout svn://120.25.238.000/repos

 svnadmin create ProjectPlan
 vi ProjectPlan/conf/svnserve.conf
 password-db = /opt/svn/passwd #密码文件
 authz-db = /opt/svn/authz #认证文件
 realm = ProjectPlan #仓库
 vi /opt/authz
 [groups]
  repos = zhoutingze,yuanlei
  ProjectPlan = zhoutingze,yuanlei
 [repos:/]
  @repos = rw
  zhoutingze = rw
  yuanlei = rw
  * = r
 [ProjectPlan:/]
  @ProjectPlan = rw

killall svnserve
svnserve -d -r /opt/svn/

 

posted @ 2016-03-30 18:20  Adtuu  阅读(212)  评论(0编辑  收藏  举报