zoukankan      html  css  js  c++  java
  • Centos SVN 搭建

    • 安装

    yum install -y subversion

    • 配置

    mkdir /data/svn/project

    svnadmin create /data/svn/project

    vim /data/svn/project/conf/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 = read
    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
    ### 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
    ### This option specifies the authentication realm of the repository.
    ### If two repositories have the same authentication realm, they should
    ### have the same password database, and vice versa.  The default realm
    ### is repository's uuid.
    realm = /data/svn/scripts

    vim /data/svn/project/conf/passwd

    [users]
    user = password

    vim /data/svn/project/conf/authz

    [/]
    user = rw
    • 启动

    svnserve -d -r /data/svn/project --listen-port 3690

    • 停止

    kill

    • 使用

    svn list svn://192.168.1.1/project --username=user --password=password

    svn mkdir svn://192.168.1.1/project/test --username=user --password=password

    svn import test svn://192.168.1.1/project/test -m "add first project" --username=user --password=password

    svn delete test svn://192.168.1.1/project/test -m "delete first project" --username=user --password=password

    svn checkout(co) svn://192.168.1.1/project/test --username=user --password=password

    svn status

    svn add * (--non-recursive) (不递归)

    svn add *.sh

    svn add dir --depth empty(只添加目录不添加下面的文件)

    svn delete *

    svn commit(ci) -m "commit"

    svn update(up) (* --accept 'mine-conflict')(本地为准)

    svn resolve * --accept 'mine-conflict'(本地为准)

    svn mv svn://192.168.1.1/project/test1 svn://192.168.1.1/project/test2

    • 备份

    svnadmin dump /data/svn/project > 20190101.dump

    • 还原

    svnadmin load /data/svn/project < /data/20180524.dump

     

    • 服务迁移后改仓库

    svn info

    svn switch --relocate svn://192.168.1.1/project/test1 svn://192.168.1.1/project/test2 

    参考文献:

    https://www.cnblogs.com/vijayfly/p/5711962.html

    http://www.linuxidc.com/Linux/2016-01/127679.htm

    http://blog.csdn.net/dandanzmc/article/details/51936136

    https://blog.csdn.net/hellboy0621/article/details/80432490

    https://blog.csdn.net/bjnihao/article/details/53023252

  • 相关阅读:
    [na]wac无线控制器集中转发部署的几种情况
    [na]windows2008-AD域的安装
    [na]数据链路层&网络层协议小结截图版
    [na]tcp&udp层各协议小结
    [na]交换机接口文档
    [na]二层sw数据交换
    [na]wireshark排查打印机问题
    [na]ip包格式
    [na]ping提示&各系统默认的TTL值
    【VS开发】C++异常处理操作
  • 原文地址:https://www.cnblogs.com/jhc888007/p/8034939.html
Copyright © 2011-2022 走看看