51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 2459|回复: 0
打印 上一主题 下一主题

[翻译] 谁能帮忙翻译一下有关svn安装方面的文章.(8)

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2006-11-3 11:01:06 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
B.  Making and Installing the Subversion Server
      -------------------------------------------

      Go back into your subversion working copy and run ./autogen.sh if
      you need to.  Then, assuming Apache httpd 2.0 is installed in the
      standard location, run:

          $ ./configure

      Note: do *not* configure subversion with "--disable-shared"!
      mod_dav_svn *must* be built as a shared library, and it will
      look for other libsvn_*.so libraries on your system.

      If you see a warning message that the build of mod_dav_svn is being
      skipped, this may be because you have Apache httpd 2.0 installed
      in a non-standard location.  You can use the "--with-apxs=" option
      to locate the apxs script:

          $ ./configure --with-apxs=/usr/local/apache2/bin/apxs

      Note: it *is* possible to build mod_dav_svn as a static library
      and link it directly into Apache. Possible, but painful. Stick
      with the shared library for now; if you can't, then ask.

          $ rm /usr/local/lib/libsvn*

      If you have old subversion libraries sitting on your system,
      libtool will link them instead of the `fresh' ones in your tree.
      Remove them before building subversion.

          $ make clean && make && make install

      After the make install, the Subversion shared libraries are in
      /usr/local/lib/.  mod_dav_svn.so should be installed in
      /usr/local/apache2/modules/.


      Section II.E explains how to build the server on Windows.


  C.  Configuring Apache for Subversion
      ---------------------------------

      The following section is an abbreviated version of the
      information in the Subversion Book
      (http://svnbook.red-bean.com).  Please read chapter 6 for more
      details.

      The following assumes you have already created a repository.
      For documentation on how to do that, see README.

      The following also assumes that you have modified
      /usr/local/apache2/conf/httpd.conf to reflect your setup.
      At a minimum you should look at the User, Group and ServerName
      directives.  Full details on setting up apache can be found at:
      http://httpd.apache.org/docs-2.0/

      First, your httpd.conf needs to load the mod_dav_svn module.
      Subversion's 'make install' target should automatically add this
      line for you.  But if apache gives you an error like "Unknown
      DAV provider: svn", then you may want to verify that this line
      exists in your httpd.conf:

         LoadModule dav_svn_module     modules/mod_dav_svn.so

      NOTE: if you built mod_dav as a dynamic module as well, make sure
      the above line appears after the one that loads mod_dav.so.

      Next, add this to the *bottom* of your httpd.conf:

      <Location /svn/repos>
          DAV svn
          SVNPath /absolute/path/to/repository
      </Location>

      This will give anyone unrestricted access to the repository.  If
      you want limited access, read or write, you add these lines to
      the Location block:

          AuthType Basic
          AuthName "Subversion repository"
          AuthUserFile /my/svn/user/passwd/file

      And:

          a) For a read/write restricted repository:

             Require valid-user

          b) For a write restricted repository:

             <LimitExcept GET PROPFIND OPTIONS REPORT>
                 Require valid-user
             </LimitExcept>

          c) For separate restricted read and write access:

             AuthGroupFile /my/svn/group/file

             <LimitExcept GET PROPFIND OPTIONS REPORT>
                 Require group svn_committers
             </LimitExcept>

             <Limit GET PROPFIND OPTIONS REPORT>
                 Require group svn_committers
                 Require group svn_readers
             </Limit>

      These are only a few simple examples.  For a complete tutorial
      on Apache access control, please consider taking a look at the
      tutorials found under "Security" on the following page:
      http://httpd.apache.org/docs-2.0/misc/tutorials.html

      In order for 'svn cp' to work (which is actually implemented as a
      DAV COPY command), mod_dav needs to be able to determine the
      hostname of the server.  A standard way of doing this is to use
      Apache's ServerName directive to set the server's hostname.  Edit
      your /usr/local/apache2/conf/httpd.conf to include:

      ServerName svn.myserver.org

      If you are using virtual hosting through Apache's NameVirtualHost
      directive, you may need to use the ServerAlias directive to specify
      additional names that your server is known by.

      If you have configured mod_deflate to be in the server, you can enable
      compression support for your repository by adding the following line
      to your Location block:

          SetOutputFilter DEFLATE


      NOTE: If you are unfamiliar with an Apache directive, or not exactly
      sure about what it does, don't hesitate to look it up in the
      documentation: http://httpd.apache.org/docs-2.0/mod/directives.html.

      NOTE: Make sure that the user 'nobody' (or whatever UID the
      httpd process runs as) has permission to read and write the
      Berkeley DB files!  This is a very common problem.


  D.  Running and Testing
      -------------------

      Fire up apache 2.0:

          $ /usr/local/apache2/bin/apachectl stop
          $ /usr/local/apache2/bin/apachectl start

      Check /usr/local/apache2/logs/error_log to make sure it started
      up okay.

      Try doing a network checkout from the repository:

          $ svn co http://localhost/svn/repos wc

      The most common reason this might fail is permission problems
      reading the repository db files.  If the checkout fails, make
      sure that the httpd process has permission to read and write to
      the repository.  You can see all of mod_dav_svn's complaints in
      the Apache error logfile, /usr/local/apache2/logs/error_log.

      To run the regression test suite for networked Subversion, see
      the instructions in subversion/tests/cmdline/README.
      For advice about tracing problems, see "Debugging the server" in
      www/hacking.html.
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

本版积分规则

关闭

站长推荐上一条 /1 下一条

小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

GMT+8, 2024-11-23 12:04 , Processed in 0.065722 second(s), 28 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

快速回复 返回顶部 返回列表