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

  • 相关阅读:
    [GEF]实现模板功能
    一篇WTP文章
    写代码的代码:JET
    投票选择eclipse.org的新界面
    在SWT里显示AWT对象
    Plugin.xml > Manifest.mf
    关于本体编程的实现
    一个用OWLS组装Web服务的例子
    感受Ruby on Rails
    通过OCP考试
  • 原文地址:https://www.cnblogs.com/fangshenghui/p/5693567.html
Copyright © 2011-2022 走看看