[svnbook] r5674 committed - branches/1.8/zh/book/ ch06-server-configuration.xml

wuzhouhui at users.sourceforge.net wuzhouhui at users.sourceforge.net
Sun Apr 29 21:59:26 CDT 2018


Revision: 5674
          http://sourceforge.net/p/svnbook/source/5674
Author:   wuzhouhui
Date:     2018-04-30 02:59:22 +0000 (Mon, 30 Apr 2018)
Log Message:
-----------
1.8/zh: translation of chapter 6 in progress

Modified Paths:
--------------
    branches/1.8/zh/book/ch06-server-configuration.xml

Modified: branches/1.8/zh/book/ch06-server-configuration.xml
===================================================================
--- branches/1.8/zh/book/ch06-server-configuration.xml	2018-04-27 23:52:10 UTC (rev 5673)
+++ branches/1.8/zh/book/ch06-server-configuration.xml	2018-04-30 02:59:22 UTC (rev 5674)
@@ -712,6 +712,7 @@
         </listitem>
 
         <listitem>
+      <!--
           <para>Do <emphasis>not</emphasis> be seduced by the simple
             idea of having all of your users access a repository
             directly via <literal>file://</literal> URLs.  Even if the
@@ -729,6 +730,17 @@
             the same as local users accessing via
             <literal>file://</literal>, and it can entail all the same
             problems if the administrator isn't careful.</para>
+      -->
+          <para><emphasis>不要</emphasis> 被这种简单的想法引诱: 让所有的用户
+            使用 <literal>file://</literal> URL 直接访问仓库. 即使仓库已经
+            准备好通过网络共享被所有人访问, 但这仍然不是个好主意. 这种做法
+            移除了用户与仓库之间的所有保护层: 用户可以有意 (或无意) 地破坏
+            仓库数据库, 为了检查或升级而对仓库进行下线操作, 也会变得非常困难,
+            而且会产生一系列与文件权限有关的问题 (见 <xref
+              linkend="svn.serverconfig.multimethod"/>). 注意, 这同时也是使用
+            <literal>svn+ssh://</literal> URL 访问仓库时需要注意的地方—
+            从安全的角度来看, 它和本地用户使用 <literal>file://</literal> 的
+            情况是等效的, 如果管理员不够认真, 将会导致同样的问题.</para>
             </listitem> </itemizedlist>
 
     </sect2>
@@ -740,12 +752,23 @@
   <!-- ================================================================= -->
   <sect1 id="svn.serverconfig.svnserve">
 
+      <!--
     <title>svnserve, a Custom Server</title>
+      -->
+    <title>svnserve, 一个定制化的服务器</title>
 
     <para>
       <indexterm>
         <primary>svnserve</primary>
-      </indexterm>The <command>svnserve</command> program is a lightweight
+      </indexterm>
+      <command>svnserve</command> 是一个轻量级的服务器程序, 基于 TCP/IP, 使用
+      一种定制化的, 有状态的协议与客户端通信, 客户端使用
+      <literal>svn://</literal> 或 <literal>svn+ssh://</literal> 形式的 URL
+      访问 <command>svnserve</command> 服务器. 本节介绍运行
+      <command>svnserve</command> 的多种方式, 服务器如何认证客户端, 以及如何为
+      仓库配置适当的访问权限.</para>
+      <!--
+      The <command>svnserve</command> program is a lightweight
       server, capable of speaking to clients over TCP/IP using a
       custom, stateful protocol.  Clients contact an
       <command>svnserve</command> server by using URLs that begin with
@@ -754,47 +777,82 @@
       <command>svnserve</command>, how clients authenticate themselves
       to the server, and how to configure appropriate access control
       to your repositories.</para>
+      -->
 
     <!-- =============================================================== -->
     <sect2 id="svn.serverconfig.svnserve.invoking">
+      <!--
       <title>Invoking the Server</title>
+      -->
+      <title>调用服务器</title>
 
       <para>
         <indexterm>
           <primary>svnserve</primary>
           <secondary>running</secondary>
-        </indexterm>There are a few different ways to run the
+        </indexterm>
+        运行程序 <command>svnserve</command> 有以下几种方式:</para>
+      <!--
+        There are a few different ways to run the
         <command>svnserve</command> program:</para>
+      -->
 
       <itemizedlist>
         <listitem>
+      <!--
           <para>Run <command>svnserve</command> as a standalone
             daemon, listening for requests.</para>
+      -->
+          <para>作为一个独立的守护进程运行 <command>svnserve</command>, 运行
+            过程中监听请求.</para>
         </listitem>
         <listitem>
+      <!--
           <para>Have the Unix <command>inetd</command> daemon
             temporarily spawn <command>svnserve</command> whenever a
             request comes in on a certain port.</para>
+      -->
+          <para>如果在特定的端口接收到了一个新请求, 就让 Unix 守护进程
+            <command>inetd</command> 临时派生 <command>svnserve</command>.
+          </para>
         </listitem>
         <listitem>
+      <!--
           <para>Have SSH invoke a temporary <command>svnserve</command>
             over an encrypted tunnel.</para>
+      -->
+          <para>使用 SSH, 在加密的通道上调用一个临时的
+            <command>svnserve</command>.</para>
         </listitem>
         <listitem>
+      <!--
           <para>Run <command>svnserve</command> as a Microsoft Windows
             service.</para>
+      -->
+          <para>作为 Microsoft Windows 服务, 运行 <command>svnserve</command>.
+          </para>
         </listitem>
         <listitem>
+      <!--
           <para>Run <command>svnserve</command> as a launchd job.</para>
+      -->
+          <para>作为一个 launchd 作业, 运行 <command>svnserve</command>.</para>
         </listitem>
       </itemizedlist>
 
+      <!--
       <para>The following sections will cover in detail these various
         deployment options for <command>svnserve</command>.</para>
+      -->
+      <para>下面的几个小节详细介绍这些不同的 <command>svnserve</command>
+        部署方式.</para>
 
       <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
       <sect3 id="svn.serverconfig.svnserve.invoking.daemon">
+      <!--
         <title>svnserve as daemon</title>
+      -->
+        <title>svnserve 作为守护进程</title>
 
         <para>
           <indexterm>
@@ -801,9 +859,14 @@
             <primary>svnserve</primary>
             <secondary>running</secondary>
             <tertiary>daemon mode</tertiary>
-          </indexterm>The easiest option is to run <command>svnserve</command>
+          </indexterm>
+          最简单的方式, 就是把 <command>svnserve</command> 作为一个守护进程
+          运行, 执行时需要添加选项 <option>-d</option>:</para>
+      <!--
+          The easiest option is to run <command>svnserve</command>
           as a standalone <quote>daemon</quote> process.  Use the
           <option>-d</option> option for this:</para>
+      -->
 
         <informalexample>
           <screen>
@@ -812,11 +875,17 @@
 </screen>
         </informalexample>
 
+      <!--
         <para>When running <command>svnserve</command> in daemon mode,
-          you can use the <option>--listen-port</option> and
-          <option>--listen-host</option> options to customize the
+          you can use the <option>- -listen-port</option> and
+          <option>- -listen-host</option> options to customize the
           exact port and hostname to <quote>bind</quote> to.</para>
+      -->
+        <para>以守护进程模式运行 <command>svnserve</command> 时, 可以使用
+          选项 <option>--listen-port</option> 和 <option>--listen-host</option>
+          修改进程所 <quote>绑定</quote> 的端口号和主机名.</para>
 
+      <!--
         <para>Once we successfully start <command>svnserve</command>
           as explained previously, it makes every repository on your
           system available to the network.  A client needs to specify
@@ -828,6 +897,15 @@
           option to <command>svnserve</command>, which restricts it to
           exporting only repositories below that path.  For
           example:</para>
+      -->
+        <para><command>svnserve</command> 一旦成功启动, 服务器上的所有仓库
+          都能通过网络进行访问. 如果客户端需要访问仓库, 必须在仓库的 URL
+          参数中指定一个 <emphasis>绝对</emphasis> 路径. 比如说某个仓库在
+          服务器上的位置是 <filename>/var/svn/project1</filename>, 那么客户
+          端访问仓库的 URL 参数就可以写成
+          <uri>svn://host.example.com/var/svn/project1</uri>. 为了增加安全
+          性, 可以为 <command>svnserve</command> 添加选项 <option>-r</option>,
+          使得只有指定路径下的仓库才会被导出, 例如:</para>
 
         <informalexample>
           <screen>
@@ -836,11 +914,16 @@
 </screen>
         </informalexample>
 
+      <!--
         <para>Using the <option>-r</option> option effectively
           modifies the location that the program treats as the root of
           the remote filesystem space.  Clients then use URLs that
           have that path portion removed from them, leaving much
           shorter (and much less revealing) URLs:</para>
+      -->
+        <para>使用选项 <option>-r</option> 等价于修改了
+          <command>svnserve</command> 的根目录, 客户端访问仓库的所使用的 URL
+          也能写得更加简短:</para>
 
         <informalexample>
           <screen>




More information about the svnbook-dev mailing list