zoukankan      html  css  js  c++  java
  • centos 安装 svn

    1: yum 安装 svn

    yum install  -y subversion

    2验证是否安装完成

    svnserve –version

    svnserve, version 1.6.11 (r934486)

       compiled Aug 17 2015, 08:37:43

    Copyright (C) 2000-2009 CollabNet.

    Subversion is open source software, see http://subversion.tigris.org/

    This product includes software developed by CollabNet (http://www.Collab.Net/).

    The following repository back-end (FS) modules are available:

    * fs_base : Module for working with a Berkeley DB repository.

    * fs_fs : Module for working with a plain file (FSFS) repository.

    Cyrus SASL authentication is available.

    3: 创建svn根目录

    cd /var/

    mkdir svn

    4:创建版本库 svnadmin create /var/svn/yzLOL

     创建完成后进入 yzLOL 目录

     该目录下有 conf  db  format  hooks  locks  README.txt 文件

      主要配置 conf 下的 authz  passwd  svnserve.conf 文件

     进入 conf 下 修改 authz

    [aliases]  

    # joe = /C=XZ/ST=Dessert/L=Snake City/O=Snake Oil, Ltd./OU=Research Institute/CN=Joe Average  

    #这里实现了别名的定义  

    [groups]  

    # harry_and_sally = harry,sally  

    # harry_sally_and_joe = harry,sally,&joe  

    team1=hjw #将上面创建的分成两个组  

    team2=gust  

    # [/foo/bar]  

    # harry = rw  

    # &joe = r #上面的别名定义在这里实现 &在这里理解为指针就很容易了  

    # * =  

    # [repository:/baz/fuz]  

    # @harry_and_sally = rw  

    # * = r  

    [yzLOL:/]  

    @team1=r  

    @team2=rw  

    # 第一个小组只有读取的权限,第二个小组有读写的权限  

    # 单个版本库的权限配置在这个文件中实现  

    修改 passwd 文件

    ### This file is an example password file for svnserve.  

    ### Its format is similar to that of svnserve.conf. As shown in the  

    ### example below it contains one section labelled [users].  

    ### The name and password for each user follow, one account per line.  

     

    [users]  

    # harry = harryssecret  

    # sally = sallyssecret  

    hjw = 1

    gust=2

     

     

    修改 svnserve.conf

     

    [general]  

    ### These options control access to the repository for unauthenticated  

    ### and authenticated users.  Valid values are "write", "read",  

    ### and "none".  The sample settings below are the defaults.  

    anon-access = none #没有登录的用户不能访问  

    auth-access = write #登录的用户可以写入  

    ### The password-db option controls the location of the password  

    ### database file.  Unless you specify a path starting with a /,  

    ### the file's location is relative to the directory containing  

    ### this configuration file.  

    ### If SASL is enabled (see below), this file will NOT be used.  

    ### Uncomment the line below to use the default password file.  

    password-db = passwd #密码文件为当前目录下的passwd  

    ### The authz-db option controls the location of the authorization  

    ### rules for path-based access control.  Unless you specify a path  

    ### starting with a /, the file's location is relative to the the  

    ### directory containing this file.  If you don't specify an  

    ### authz-db, no path-based access control is done.  

    ### Uncomment the line below to use the default authorization file.  

    authz-db = authz #验证文件为当前目录下的authz  

     

     5: 启动svn

    svnserve –d –r /var/svn

    6:导入工程

    将工程放入根目录下(yzLOL)

    svn import /yzLOL svn://ip/yzLOL/yzLOL -m "first import project"

    导入后 删除根目录下 yzLOL

     rm -rf yzLOL

    7:检出导入的工程

    svn checkout svn://ip/yzLOL/yzLOL

  • 相关阅读:
    TCP Socket 粘包
    Toast连续弹出的问题
    SDK Build Tools revision (19.0.3) is too low for project Minimum required is 19.1.0
    数据结构精要------直接选择和堆排序算法
    hdoj 2199 Can you solve this equation? 【二分枚举】
    云端数据遭觊觎 安全问题不容忽视
    leetcode || 58、Length of Last Word
    【安全加密技术】非对称加密
    无处不在的微创新——验证码的故事
    IDLE经常使用快捷键汇总
  • 原文地址:https://www.cnblogs.com/hjwbla/p/6207740.html
Copyright © 2011-2022 走看看