zoukankan      html  css  js  c++  java
  • linux svn 服务端搭建

    环境是centos6.x。 关于团队对代码管理,相信大部分人习惯于svn。不过我个人比较喜欢git的。这个blog git 常用命令 就是介绍git的基本用法。现部署svn服务端方式如下:

    1. 用yum安装如下:
      yum install subversion
    2. 输入 svn --help可以查看svn的使用方法.

      usage: svn <subcommand> [options] [args]
      Subversion command-line client, version 1.6.11.
      Type 'svn help <subcommand>' for help on a specific subcommand.
      Type 'svn --version' to see the program version and RA modules
      or 'svn --version --quiet' to see just the version number.  

      Most subcommands take file and/or directory arguments, recursing
      on the directories. If no arguments are supplied to such a
      command, it recurses on the current directory (inclusive) by default.

      Available subcommands:
      add
      blame (praise, annotate, ann)
      cat
      changelist (cl)
      checkout (co)
      cleanup
      commit (ci)
      copy (cp)
      delete (del, remove, rm)
      diff (di)
      export
      help (?, h)
      import
      info
      list (ls)
      lock
      log
      merge  
      mergeinfo
      mkdir
      move (mv, rename, ren)
      propdel (pdel, pd)
      propedit (pedit, pe)
      propget (pget, pg)
      proplist (plist, pl)
      propset (pset, ps)
      resolve
      resolved
      revert
      status (stat, st)
      switch (sw)
      unlock
      update (up)

      Subversion is a tool for version control.
      For additional information, see http://subversion.tigris.org/

    3. 创建svn版本库目录
      mkdir -p /var/svn/svnrepos
    4. 创建版本库
      svnadmin create /var/svn/svnrepos
      得到目录如下:

      drwxr-xr-x 2 root root 4096 Jan 20 18:13 conf
      drwxr-sr-x 6 root root 4096 Jan 20 18:06 db
      -r--r--r-- 1 root root 2 Jan 20 18:06 format
      drwxr-xr-x 2 root root 4096 Jan 20 18:06 hooks
      drwxr-xr-x 2 root root 4096 Jan 20 18:06 locks
      -rw-r--r-- 1 root root 229 Jan 20 18:06 README.txt


    5. svn的相关配置在conf下

    •   authz文件是权限控制文 件
    •   passwd是帐号密码文件
    •   svnserve.conf SVN服务配置文件

    6. 设置帐号密码
      打开passwd文件
      在[users]块中添 加用户和密码,格式:帐号=密码,如llz=llz

    7. 设置权限
      打开authz 文件
      在末尾添加如下代码:

      [/]
      llz=rw # 有读写权限
      carlos=r # 有读权限

    8. 修改svnserve.conf文件
      修改如下:
      打开下面的几个注释:
      anon-access = read #匿名用户可读
      auth-access = write #授权用户可写
      password-db = passwd #使用哪个文件作为账号文件
      authz-db = authz #使用哪个文件作为权限文件
      realm = /var/svn/svnrepos # 认证空间名,版本库所在目录

    9. 启动svn版本库
      svnserve -d -r /var/svn/svnrepos

  • 相关阅读:
    解决VS打开文件出现No EditorOptionDefinition export found for the given option name问题
    git SourceTree 客户端 安装/使用教程
    C#调用WebService实例和开发
    Web Service 和WCF的比较
    Web Service 消息格式
    C#如何使用REST接口读写数据
    解决EasyNVR现场无固定公网IP的问题,万千企业期待的EasyNVS管理平台是什么?
    借助EasyNTS云组网,无需拉专线,也能解决设备现场无公网固定IP的问题
    EasyPlayer-RTSP-Android安卓播放器播放RTSP延迟优化策略,极低延时!
    EasyNVR现场部署搭配EasyNVS云端集中控制应用于幼儿园直播场景的最佳方案!
  • 原文地址:https://www.cnblogs.com/fangshenghui/p/5693567.html
Copyright © 2011-2022 走看看