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

  • 相关阅读:
    【干货分享】C# 实体类生成工具
    ASP.NET Core部署系列二:发布到CentOS上
    ASP.NET Core部署系列一:发布到IIS上
    微信公众号开发:用户管理
    微信公众号开发:自定义菜单
    像使用SQL一样对List对象集合进行排序
    使用JRebel插件实现SpringBoot应用代码热加载
    Java Stream函数式编程图文详解(二):管道数据处理
    SpringBoot生命周期管理之停掉应用服务几种方法
    本月16日SpringBoot2.2发布,有哪些变化先知晓
  • 原文地址:https://www.cnblogs.com/fangshenghui/p/5693567.html
Copyright © 2011-2022 走看看