Centos环境搭建SVN服务器

1.安装

yum -y install subversion

2.创建SVN版本库

mkdir -p /opt/svn/repos/your-svn          

svnadmin create /opt/svn/repos/your-svn

3.配置版本库

cd /opt/svn/repos/your-svn/conf

vim passwd     #添加用户

[users]
#    harry = harryssecret
#    sally = sallyssecret
#
user1 = 123

user2 = 123

vim authz    #添加权限

          [your-svn:/]
         user1 = rw

        user2 = rw

vim svnserve.conf  #取消一些注释

         [general]
         anon-access = none          #非授权用户无法访问
         auth-access = write          #授权用户有写权限
         password-db = passwd     #密码数据所在目录

        authz-db = authz

4.启动SVN

    svnserve -d -r /opt/svn/repos/

    ps aux | grep svnserve     #验证

5.测试SVN的服务器

    svn://192.168.1.1/your-svn

6.创建多个版本库

    mkdir -p /opt/svn/repos/your-svn2
    svnadmin create /opt/svn/repos/your-svn2
    重复步骤3
    killall svnserve

    svnserve -d -r /opt/svn/repos

7.删除版本库

    rm -rf your-svn/

8.同个SVN库权限分组

    [groups]
  PM = user1,user2
  RD = user3,user4
    [your-svn:/]
    test = rw
    other = rw
    anyone = rw
    @chanpin = rw
    @yanfa = rw

    [your-svn:/PM]
    other = rw
     @chanpin = rw

    * =

    [your-svn:/RD]
    anyone = rw
    @yanfa = rw
    * =


猜你喜欢

转载自blog.csdn.net/qq_33684032/article/details/80781484