﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-灵魂-放水-随笔分类-配置管理</title><link>http://www.blogjava.net/zqli/category/14440.html</link><description>为学日益，为道日损。</description><language>zh-cn</language><lastBuildDate>Tue, 27 Feb 2007 10:29:29 GMT</lastBuildDate><pubDate>Tue, 27 Feb 2007 10:29:29 GMT</pubDate><ttl>60</ttl><item><title>Subversion's design documents-bubble-up method</title><link>http://www.blogjava.net/zqli/archive/2006/11/13/80834.html</link><dc:creator>放水老倌</dc:creator><author>放水老倌</author><pubDate>Mon, 13 Nov 2006 02:40:00 GMT</pubDate><guid>http://www.blogjava.net/zqli/archive/2006/11/13/80834.html</guid><wfw:comment>http://www.blogjava.net/zqli/comments/80834.html</wfw:comment><comments>http://www.blogjava.net/zqli/archive/2006/11/13/80834.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zqli/comments/commentRss/80834.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zqli/services/trackbacks/80834.html</trackback:ping><description><![CDATA[
		<div class="h5" id="server.fs.struct.bubble-up">
				<h5>Bubble-Up Method</h5>
				<p>This section provides a conversational explanation of how the repository actually stores and revisions file trees. It's not critical knowledge for a programmer using the Subversion Filesystem API, but most people probably still want to know what's going on “under the hood” of the repository.</p>
				<p>Suppose we have a new project, at revision 1, looking like this (using CVS syntax):</p>
				<pre>prompt$ svn checkout myproj
U myproj/
U myproj/B
U myproj/A
U myproj/A/fish
U myproj/A/fish/tuna
prompt$
</pre>
				<p>Only the file <tt class="filename">tuna</tt> is a regular file, everything else in myproj is a directory.</p>
				<p>Let's see what this looks like as an abstract data structure in the repository, and how that structure works in various operations (such as update, commit, and branch).</p>
				<p>In the diagrams that follow, lines represent parent-to-child connections in a directory hierarchy. Boxes are "nodes". A node is either a file or a directory – a letter in the upper left indicates which kind. A file node has a byte-string for its content, whereas directory nodes have a list of dir_entries, each pointing to another node.</p>
				<p>Parent-child links go both ways (i.e., a child knows who all its parents are), but a node's name is stored only in its parent, because a node with multiple parents may have different names in different parents.</p>
				<p>At the top of the repository is an array of revision numbers, stretching off to infinity. Since the project is at revision 1, only index 1 points to anything; it points to the root node of revision 1 of the project:</p>
				<pre>                    ( myproj's revision array )
       ______________________________________________________
      |___1_______2________3________4________5_________6_____...
          |
          |
       ___|_____
      |D        |
      |         |
      |   A     |      /* Two dir_entries, `A' and `B'. */
      |    \    |
      |   B \   |
      |__/___\__|
        /     \
       |       \
       |        \
    ___|___   ___\____
   |D      | |D       |
   |       | |        |
   |       | | fish   |   /* One dir_entry, `fish'. */
   |_______| |___\____|
                  \
                   \
                 ___\____
                |D       |
                |        |
                | tuna   |  /* One dir_entry, `tuna'. */
                |___\____|
                     \
                      \
                    ___\____
                   |F       |
                   |        |
                   |        |   /* (Contents of tuna not shown.) */
                   |________|

</pre>
				<p>What happens when we modify <tt class="filename">tuna</tt> and commit? First, we make a new <tt class="filename">tuna</tt> node, containing the latest text. The new node is not connected to anything yet, it's just hanging out there in space:</p>
				<pre>                         ________
                        |F       |
                        |        |
                        |        |
                        |________|
</pre>
				<p>Next, we create a <em>new</em> revision of its parent directory:</p>
				<pre>                 ________
                |D       |
                |        |
                | tuna   |
                |___\____|
                     \
                      \
                    ___\____
                   |F       |
                   |        |
                   |        |
                   |________|
</pre>
				<p>We continue up the line, creating a new revision of the next parent directory:</p>
				<pre>              ________
             |D       |
             |        |
             | fish   |
             |___\____|
                  \
                   \
                 ___\____
                |D       |
                |        |
                | tuna   |
                |___\____|
                     \
                      \
                    ___\____
                   |F       |
                   |        |
                   |        |
                   |________|
</pre>
				<p>Now it gets more tricky: we need to create a new revision of the root directory. This new root directory needs an entry to point to the “new” directory A, but directory B hasn't changed at all. Therefore, our new root directory also has an entry that still points to the <em>old</em> directory B node!</p>
				<pre>       ______________________________________________________
      |___1_______2________3________4________5_________6_____...
          |
          |
       ___|_____             ________
      |D        |           |D       |
      |         |           |        |
      |   A     |           |   A    |
      |    \    |           |    \   |
      |   B \   |           |   B \  |
      |__/___\__|           |__/___\_|
        /     \               /     \
       |    ___\_____________/       \
       |   /    \                     \
    ___|__/   ___\____              ___\____
   |D      | |D       |            |D       |
   |       | |        |            |        |
   |       | | fish   |            | fish   |
   |_______| |___\____|            |___\____|
                  \                     \
                   \                     \
                 ___\____              ___\____
                |D       |            |D       |
                |        |            |        |
                | tuna   |            | tuna   |
                |___\____|            |___\____|
                     \                     \
                      \                     \
                    ___\____              ___\____
                   |F       |            |F       |
                   |        |            |        |
                   |        |            |        |
                   |________|            |________|

</pre>
				<p>Finally, after all our new nodes are written, we finish the “bubble up” process by linking this new tree to the next available revision in the history array. In this case, the new tree becomes revision 2 in the repository.</p>
				<pre>       ______________________________________________________
      |___1_______2________3________4________5_________6_____...
          |        \
          |         \__________
       ___|_____             __\_____
      |D        |           |D       |
      |         |           |        |
      |   A     |           |   A    |
      |    \    |           |    \   |
      |   B \   |           |   B \  |
      |__/___\__|           |__/___\_|
        /     \               /     \
       |    ___\_____________/       \
       |   /    \                     \
    ___|__/   ___\____              ___\____
   |D      | |D       |            |D       |
   |       | |        |            |        |
   |       | | fish   |            | fish   |
   |_______| |___\____|            |___\____|
                  \                     \
                   \                     \
                 ___\____              ___\____
                |D       |            |D       |
                |        |            |        |
                | tuna   |            | tuna   |
                |___\____|            |___\____|
                     \                     \
                      \                     \
                    ___\____              ___\____
                   |F       |            |F       |
                   |        |            |        |
                   |        |            |        |
                   |________|            |________|

</pre>
				<p>Generalizing on this example, you can now see that each “revision” in the repository history represents a root node of a unique tree (and an atomic commit to the whole filesystem.) There are many trees in the repository, and many of them share nodes.</p>
				<p>Many nice behaviors come from this model:</p>
				<ol>
						<li>
								<p>
										<strong>Easy reads.</strong> If a filesystem reader wants to locate revision <em class="replaceable">X</em> of file <tt class="filename">foo.c</tt>, it need only traverse the repository's history, locate revision <em class="replaceable">X</em>'s root node, then walk down the tree to <tt class="filename">foo.c</tt>.</p>
						</li>
						<li>
								<p>
										<strong>Writers don't interfere with readers.</strong> Writers can continue to create new nodes, bubbling their way up to the top, and concurrent readers cannot see the work in progress. The new tree only becomes visible to readers after the writer makes its final “link” to the repository's history.</p>
						</li>
						<li>
								<p>
										<strong>File structure is versioned.</strong> Unlike CVS, the very structure of each tree is being saved from revision to revision. File and directory renames, additions, and deletions are part of the repository's history.</p>
						</li>
				</ol>
				<p>Let's demonstrate the last point by renaming the <tt class="filename">tuna</tt> to <tt class="filename">book</tt>.</p>
				<p>We start by creating a new parent “fish” directory, except that this parent directory has a different dir_entry, one which points the <em>same</em> old file node, but has a different name:</p>
				<pre>       ______________________________________________________
      |___1_______2________3________4________5_________6_____...
          |        \
          |         \__________
       ___|_____             __\_____
      |D        |           |D       |
      |         |           |        |
      |   A     |           |   A    |
      |    \    |           |    \   |
      |   B \   |           |   B \  |
      |__/___\__|           |__/___\_|
        /     \               /     \
       |    ___\_____________/       \
       |   /    \                     \
    ___|__/   ___\____              ___\____
   |D      | |D       |            |D       |
   |       | |        |            |        |
   |       | | fish   |            | fish   |
   |_______| |___\____|            |___\____|
                  \                     \
                   \                     \
                 ___\____              ___\____      ________
                |D       |            |D       |    |D       |
                |        |            |        |    |        |
                | tuna   |            | tuna   |    | book   |
                |___\____|            |___\____|    |_/______|
                     \                     \         /
                      \                     \       /
                    ___\____              ___\____ /
                   |F       |            |F       |
                   |        |            |        |
                   |        |            |        |
                   |________|            |________|
</pre>
				<p>From here, we finish with the bubble-up process. We make new parent directories up to the top, culminating in a new root directory with two dir_entries (one points to the old “B” directory node we've had all along, the other to the new revision of “A”), and finally link the new tree to the history as revision 3:</p>
				<pre>       ______________________________________________________
      |___1_______2________3________4________5_________6_____...
          |        \        \_________________
          |         \__________               \
       ___|_____             __\_____        __\_____
      |D        |           |D       |      |D       |
      |         |           |        |      |        |
      |   A     |           |   A    |      |   A    |
      |    \    |           |    \   |      |    \   |
      |   B \   |           |   B \  |      |   B \  |
      |__/___\__|           |__/___\_|      |__/___\_|
        /  ___________________/_____\_________/     \
       |  / ___\_____________/       \               \
       | / /    \                     \               \
    ___|/_/   ___\____              ___\____      _____\__
   |D      | |D       |            |D       |    |D       |
   |       | |        |            |        |    |        |
   |       | | fish   |            | fish   |    | fish   |
   |_______| |___\____|            |___\____|    |___\____|
                  \                     \             \
                   \                     \             \
                 ___\____              ___\____      ___\____
                |D       |            |D       |    |D       |
                |        |            |        |    |        |
                | tuna   |            | tuna   |    | book   |
                |___\____|            |___\____|    |_/______|
                     \                     \         /
                      \                     \       /
                    ___\____              ___\____ /
                   |F       |            |F       |
                   |        |            |        |
                   |        |            |        |
                   |________|            |________|

</pre>
				<p>For our last example, we'll demonstrate the way “tags” and “branches” are implemented in the repository.</p>
				<p>In a nutshell, they're one and the same thing. Because nodes are so easily shared, we simply create a <em>new</em> directory entry that points to an existing directory node. It's an extremely cheap way of copying a tree; we call this new entry a <strong class="firstterm">clone</strong>, or more colloquially, a “cheap copy”.</p>
				<p>Let's go back to our original tree, assuming that we're at revision 6 to begin with:</p>
				<pre>       ______________________________________________________
    ...___6_______7________8________9________10_________11_____...
          |
          |
       ___|_____
      |D        |
      |         |
      |   A     |
      |    \    |
      |   B \   |
      |__/___\__|
        /     \
       |       \
       |        \
    ___|___   ___\____
   |D      | |D       |
   |       | |        |
   |       | | fish   |
   |_______| |___\____|
                  \
                   \
                 ___\____
                |D       |
                |        |
                | tuna   |
                |___\____|
                     \
                      \
                    ___\____
                   |F       |
                   |        |
                   |        |
                   |________|

</pre>
				<p>Let's “tag” directory A. To make the clone, we create a new dir_entry <strong>T</strong> in our root, pointing to A's node:</p>
				<pre>       ______________________________________________________
      |___6_______7________8________9________10_________11_____...
          |        \
          |         \
       ___|_____   __\______
      |D        | |D        |
      |         | |         |
      |   A     | |    A    |
      |    \    | |    |    |
      |   B \   | |  B |  T |
      |__/___\__| |_/__|__|_|
        /     \    /   |  |
       |    ___\__/   /  /
       |   /    \    /  /
    ___|__/   ___\__/_ /
   |D      | |D       |
   |       | |        |
   |       | | fish   |
   |_______| |___\____|
                  \
                   \
                 ___\____
                |D       |
                |        |
                | tuna   |
                |___\____|
                     \
                      \
                    ___\____
                   |F       |
                   |        |
                   |        |
                   |________|

</pre>
				<p>Now we're all set. In the future, the contents of directories A and B may change quite a lot. However, assuming we never make any changes to directory T, it will <em>always</em> point to a particular pristine revision of directory A at some point in time. Thus, T is a tag.</p>
				<p>(In theory, we can use some kind of authorization system to prevent anyone from writing to directory T. In practice, a well-laid out repository should encourage “tag directories” to live in one place, so that it's clear to all users that they're not meant to change.)</p>
				<p>However, if we <em>do</em> decide to allow commits in directory T, and now our repository tree increments to revision 8, then T becomes a branch. Specifically, it's a branch of directory A which shares history with A up to a certain point, and then “broke off” from the main line at revision 8.<br /><br /></p>
				<div class="h2" id="license" title="#license">
						<h2>License — Copyright</h2>
						<p>Copyright © 2000-2006 Collab.Net. All rights reserved.</p>
						<p>This software is licensed as described in the file <tt class="filename">COPYING</tt>, which you should have received as part of this distribution. The terms are also available at <a href="http://subversion.tigris.org/license-1.html"><font color="#002c99">http://subversion.tigris.org/license-1.html</font></a>. If newer versions of this license are posted there, you may use a newer version instead, at your option.<br /><br />track:http://subversion.tigris.org/design.html#server.fs.struct.bubble-up</p>
				</div>
				<!-- license (h2) -->
		</div>
		<!-- server.fs.struct.bubble-up (h5) -->
<img src ="http://www.blogjava.net/zqli/aggbug/80834.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zqli/" target="_blank">放水老倌</a> 2006-11-13 10:40 <a href="http://www.blogjava.net/zqli/archive/2006/11/13/80834.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[转]manpage of htpasswd</title><link>http://www.blogjava.net/zqli/archive/2006/08/29/66366.html</link><dc:creator>放水老倌</dc:creator><author>放水老倌</author><pubDate>Tue, 29 Aug 2006 02:30:00 GMT</pubDate><guid>http://www.blogjava.net/zqli/archive/2006/08/29/66366.html</guid><wfw:comment>http://www.blogjava.net/zqli/comments/66366.html</wfw:comment><comments>http://www.blogjava.net/zqli/archive/2006/08/29/66366.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zqli/comments/commentRss/66366.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zqli/services/trackbacks/66366.html</trackback:ping><description><![CDATA[
		<h2>NAME(名称)</h2>htpasswd - 创建和更新用户认证文件 <a name="lbAC"> </a><h2>SYNOPSIS(总览)</h2><b>htpasswd</b> [ <b>-c</b> ] [ <b>-m</b> | <b>-d</b> | <b>-s</b> | <b>-p</b> ] <i>passwdfile</i><i>username</i><br /><b>htpasswd</b><b>-b </b>[ <b>-c</b> ] [ <b>-m</b> | <b>-d</b> | <b>-s</b> | <b>-p</b> ] <i>passwdfile</i><i>username</i><i>password</i><a name="lbAD"> </a><h2>DESCRIPTION(描述)</h2><b>htpasswd</b> 用来创建和更新保存着 HTTP用户基本认证的用户和密码的平面文件. 如果 <b>htpasswd</b> 不能访问文件,那么就不可能写入到输出文件, 也不可能读取文件以更新它, 它会返回错误状态并不作任何修改. 
<p>从 <b>httpd</b> Apache web服务器获取的资源只限于由 <b>htpasswd</b> 创建的文件中所列出的用户使用. 该程序只能用于用户名保存在平面文件的情况下. 要使用DBM数据库,请参看 <b>dbmmanage</b>. 
</p><p><b>htpasswd</b> 的加密密码既可以使用针对Apache修改的MD5版本, 也可以使用系统的<i>crypt()</i>程序. 由 <b>htpasswd</b> 管理的文件可能同时包含两种类型的密码; 一些用户记录可使用MD5加密的密码, 而另一些用户记录可在同一文件中使用通过 <i>crypt()</i>加密的密码. 
</p><p>该手册页只列出了命令行的参数. 要获得关于在 <b>httpd</b> 中配置用户认证的必要指令的详细情况, 可参看Apache手册,它是Apache发布版本的一部分,你也可以在 &lt;URL:<a href="http://kajaa.bbs.us/www.apache.org/default.htm">http://www.apache.org/</a>&gt;上找到它. <a name="lbAE"> </a></p><h2>OPTIONS(选项)</h2><dl compact=""><dt>-b 
</dt><dd>使用批处理模式;<i>也即</i>,从命令行上获取密码而不给出提示.<b>该选项在使用时应特别小心, 因为密码是在命令行上清楚可见的.</b></dd><dt>-c 
</dt><dd>创建<i>passwdfile</i>.如果<i>passwdfile</i> 已经存在,那么它会重新写入并删去原有内容. 
</dd><dt>-m 
</dt><dd>密码使用Apache修改的MD5算法. 使用这种算法加密的密码可以移植到运行Apache 1.3.9或更新版本的任何平台上(Windows,Unix,BeOS,等等). 在Windows和TPF上,该标识是默认的. 
</dd><dt>-d 
</dt><dd>密码使用crypt()加密.这是除了Windows和TPF 之外的所有平台上的默认值.尽管这可被所有平台上的 <b>htpasswd</b> 支持,却不被Windows和TPF上的 <b>httpd</b> 服务器所支持. 
</dd><dt>-s 
</dt><dd>密码使用SHA加密方法.这种方式移植于Netscape服务器, 使用的是LDAP目录交换格式(ldif). 
</dd><dt>-p 
</dt><dd>使用普通文本格式的密码.尽管 <b>htpasswd</b> 可支持在所有平台上创建这种格式的密码, 却只有Windows和TPF上的 <b>httpd</b> 守护程序能够接受普通文本密码. 
</dd><dt><b></b><i>passwdfile</i></dt><dd>包含用户名和密码的文件的名字. 如果给定了-c,那么会在其不存在的情况下创建该文件, 或者在其存在的情况下重新写入并删去原有内容. 
</dd><dt><b></b><i>username</i></dt><dd>在<b>passwdfile</b>中创建或更新的用户名. 如果<i>username</i>在文件中不存在, 即创建一条记录. 如果已经存在,则修改其密码. 
</dd><dt><b></b><i>password</i></dt><dd>文件中加密和存储的普通文本格式的密码. 只用于<i>-b</i>标识. </dd></dl><a name="lbAF"> </a><h2>EXIT STATUS(退出状态)</h2>如果在<i>passwdfile</i>中用户名和密码添加或更新成功, <b>htpasswd</b> 返回0状态("true"). 如果在存取文件时遇到某些问题 <b>htpasswd</b> 返回1, 如果在命令行中有语法错误, <b>htpasswd</b> 返回2, 如果交互式输入的密码与其验证项不匹配, <b>htpasswd</b> 返回3, 如果操作被中断, <b>htpasswd</b> 返回4, 如果某个值(用户名,文件名,密码或最终计算出的记录)太长, <b>htpasswd</b> 返回5, 如果用户名包含无效的字符(参看<b>RESTRICTIONS</b>部分), <b>htpasswd</b> 返回6. <a name="lbAG"> </a><h2>EXAMPLES(示例)</h2><b>htpasswd /usr/local/etc/apache/.htpasswd-users jsmith</b><dl compact=""><dt></dt><dd>为用户<i>jsmith</i>添加或修改密码. 会给出用户输入密码的提示. 如果在Windows系统上执行, 密码会使用修改的Apache MD5算法加密; 否则,会使用系统的 <i>crypt()</i>程序. 如果文件不存在, <b>htpasswd</b> 会不作任何修改并返回一条错误提示. </dd></dl><p><b>htpasswd -c /home/doe/public_html/.htpasswd jane</b></p><dl compact=""><dt></dt><dd>创建一个新的文件并将用户<i>jane</i>记录保存在其中. 会给出用户输入密码的提示. 如果文件存在但不能够读取,或者不能够写入, 那么它不会作修改,而且 <b>htpasswd</b> 会显示一条消息并返回一个错误状态. </dd></dl><p><b>htpasswd -mb /usr/web/.htpasswd-all jones Pwd4Steve</b></p><dl compact=""><dt></dt><dd>使用MD5算法加密取自命令行的密码, 并将其保存到指定的文件中. </dd></dl><p><a name="lbAH"></a></p><h2>SECURITY CONSIDERATIONS(安全考虑)</h2>Web密码文件如由 <b>htpasswd</b> 管理的这些应该<b>不</b>在Web服务器的URI空间范围之内 -- 也就是说, 浏览器不应该能够获取他们. 
<p>建议不要使用<i>-b</i>选项,因为使用该选项时未加密的密码出现在了命令行上. <a name="lbAI"> </a></p><h2>RESTRICTIONS(限制)</h2>在Windows和MPE平台上,使用 <b>htpasswd</b> 加密的密码的长度限制在255个字符以内. 超出此长度的密码会取前255个字符. 
<p>使用的MD5算法是Apache软件特有的; 使用它加密的密码对于其他Web服务器来说是不可用的. 
</p><p>用户名限制在255个字节以内,而且不能包含字符':'. q.SH SEE ALSO(另见) <b><a href="http://kajaa.bbs.us/localhost/cgi-bin/man/man2html@8+httpd">httpd</a>(8)</b> 以及随发布版本所带的support/SHA1下的脚本. </p><img src ="http://www.blogjava.net/zqli/aggbug/66366.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zqli/" target="_blank">放水老倌</a> 2006-08-29 10:30 <a href="http://www.blogjava.net/zqli/archive/2006/08/29/66366.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Apache2+Subversion1.3.x安装手记</title><link>http://www.blogjava.net/zqli/archive/2006/08/28/66108.html</link><dc:creator>放水老倌</dc:creator><author>放水老倌</author><pubDate>Mon, 28 Aug 2006 02:20:00 GMT</pubDate><guid>http://www.blogjava.net/zqli/archive/2006/08/28/66108.html</guid><wfw:comment>http://www.blogjava.net/zqli/comments/66108.html</wfw:comment><comments>http://www.blogjava.net/zqli/archive/2006/08/28/66108.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zqli/comments/commentRss/66108.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zqli/services/trackbacks/66108.html</trackback:ping><description><![CDATA[一、安装<br />第一次安装Subversion，在昨天的安装过程中，出现了一些问题：<br /><strong>第一步,安装Apache+Subversion</strong><br />       首先，我选择了apache_2.2.3+svn-1.3.2的组合。开始安装Apache server就报错，提示http.conf第133行出错，打开在前面加了个#，启动成功。接着安装svn-1.3.2，配置好httpd.conf之后发现apche的服务无法启动，说是无法加载mod_dav_svn.so。baidu之后发现是svn无法在apache2.2下面安装，其<a href="http://subversion.tigris.org/project_packages.html"><font style="BACKGROUND-COLOR: #fdfde1" color="#cc0000">官方下载页面</font></a>也有提示说：Note that the Apache modules included in this package was compiled against Apache HTTP Server 2.0, and thus will <em>not</em> work with Apache HTTP Server 2.2.下载的过程中，没注意这个东西！下次得多留意这些细节。<br /><br />       只好重新下载安装apache_2.0.59版本，把Subversion/bin下面所有.dll文件复制到Apache Group\Apache2\bin下，提示有文件覆盖，选择不覆盖；再将Subversion/bin下的.so文件复制到Apache Group\Apache2\modules下。<br /><br />安装Apache2.x时注意事项:<br /><br />请确保你输入正确的服务器URL（如果你的服务器没有DNS名称，你可以直接输入IP地址）。我建议你将Apache安装成 for all Users,on Port 80,as a service。注意：如果你已经有一个IIS或者其它的程序使用80端口，安装可能会失败。如果是这样，你可以到程序目录下的Apache Group\Apache2\conf目录中找到文件httpd.conf，将其中的Listen 80改成一个不用的端口，比如Listen 81。重新运行安装程序，这次应该不会再有问题了。<br /><br /><br /><p><strong>第二步,修改apache的配置文件<br /></strong>接著打开Apache HTTP Server 的 httpd.conf（在 <apache_root>/conf/ 目录下），先找到以下两行：<br />#LoadModule dav_module modules/mod_dav.so<br />#LoadModule dav_fs_module modules/mod_dav_fs.so<br />把這两行最前面的 '#' 字符刪除，然后把下面这行加到这些 LoadModule 指令的后面：<br />LoadModule dav_svn_module modules/mod_dav_svn.so<br />LoadModule authz_svn_module modules/mod_authz_svn.so<br />用记事本打开 Apache HTTP Server 的 httpd.conf，在文件最后面加上以下几行:<br />&lt;Location /svn&gt;<br />    DAV svn<br />    SVNParentPath d:/svn<br />&lt;/Location&gt;<br />其中d:/svn为你要建的仓库的父目录(必须为本地目录),最好用双引号引一下.<br /></apache_root></p><p><strong>第三步,创建仓库<br /></strong>根据apache的配置文件的设置建立目录:d:/svn.然后我们就可以在下面建立仓库了,创建方法如下:<br />c:\&gt;svnadmin create d:/svn/repository（svn大写的时候居然验证访问被拒绝）<br />命令执行成功之后,会在d:/svn/repository下面生成很多的文件和目录</p><p><strong>第四步,使用<br /></strong>重新启动Apache Server<br />在浏览器中输入网址: <br />http://localhost/svn/repository/<br />这时候,看到页面显示：<br /><br />Revision 0: /<br /><em>Powered by </em><a href="http://subversion.tigris.org/"><em>Subversion</em></a><em> version 1.3.2 (r19776).<br /></em><br /><br /><br /><br /><br />安装成功，接下来将进行进一步的设置。<br /><br />二、配置<br /><br />1．  以两种方式运行<br /><br />（1） 以apache方式运行<br />  svn使用apache的权限管理对档案库及目录进行读写管理。<br />  htpasswd的调用:<br />    1)用cmd进入到Apache的bin目录下,直接开始调用<br />    2)把htpasswd添加到系统变量里.<br />  <br />  建立保存用户名和密码的文件<br />  htpasswd -c  svn-auth-filename  username1<br />  然后，会提示输入密码，这里就加入了一个用户了。然后再加一个用户：<br />  htpasswd -m  /svn-auth-filename username2<br />  <br />  建立控制用户访问权限的文件svn-access-filename<br /> [svn1:/]               //这表示，仓库svn1的根目录下的访问权限<br /> harry = rw             // svn1仓库harry用户具有读和写权限<br /> sally = r               // svn1仓库sally用户具有读权限<br /> [svn2:/]               //svn2仓库根目录下的访问权限<br /> harry = r               // harry用户在svn2仓库根目录下只有读权限<br /> sally =               // sally用户在 svn2仓库根目录下无任何权限<br /> [svn2:/src]           //svn2仓库下src目录的访问权限<br /> harry=rw             <br /> sally=r<br /> [/]                  // 这个表示在所有仓库的根目录下<br /> * = r               // 这个表示对所有的用户都具有读权限<br /> [groups]               // 这个表示群组设置<br /> svn1-developers = harry, sally           // 这个表示某群组里的成员<br /> svn2-developers = sally<br /> [svn1:/]            <br /> @svn1-developers = rw       // 如果在前面加上@符号，则表示这是个群组权限设置<br />  <br />然后修改httpd.conf配置：<br />&lt;Location /svn&gt; <br />DAV svn<br />SVNParentPath /svn<br />AuthType Basic<br />AuthName "Subversion repository"(注意引号)<br />AuthUserFile  svn-auth-filename （保存用户名和密码）<br />Require valid-user<br />AuthzSVNAccessFile  svn-access-filename（保存用户访问的权限策略）<br />&lt;/Location&gt;<br />（注：）<br />svn-access-filename,svn-auth-filename 文件直接可以放到C:\Program Files\Apache Group\Apache2\下，这也是默认的目录，置于其他目录下，启动apache server出现错错误。<br />AuthUserFile文件需要用htpasswd工具创建、维护；AuthzSVNAccessFile 文件可以用Subversion创建仓库以后，生成的conf文件夹下面的authz文件加以修改。<br />如果已经有一个apache服务，希望两个apache服务同时运行，则修改其中一个的服务端口。<br />修改httpd.conf中的一行： Listen 80 将80改成其他不用的端口号</p><p>启动apahce就可以通过<br /><a href="http://svnmachine-ip/svn/svn1">http://svnmachine-ip/svn/svn1</a><br /><a href="http://svnmachine-ip/svn/svn2">http://svnmachine-ip/svn/svn2</a><br />这两个URL来访问仓库了，当然，要受权限的限制，必须是合法用户才能访问且具有相应的权限</p><p>（2） svnserve方式运行<br />这种方式的运行又可以分为以下两种(这和vsftp有些相似)<br />1) standalone mode<br />直接运行 #svnserve –d<br />运行 lsof -i :3690可以看到SVN服务器已经在运行</p><p>2) xinetd mode<br />在/etc/xinetd.d/下生成svnserve文件，内容如下<br />service svnserve<br />{<br />disable = no<br />socket_type = stream<br />protocol = tcp<br />wait = no<br />user = svnpub  (最好建一个这样的用户管理svn)<br />server = /usr/local/bin/svnserve<br />server_args = -i<br />}<br />编辑 /etc/services 檔,加入底下两行:<br />svnserve 3690/tcp # Subversion svnserve<br />svnserve 3690/udp # Subversion svnserve<br />重启xinetd服务，运行 netstat -a|grep svnserve 可以看到SVN服务器已经在运行</p><p>默认下客户可以以匿名方式通过svn://方式任意访问档案库，为了限制其权限，比如只允许读操作，可以通过修改档案库conf子目录中的svnseve.conf文件来实现。<br />#vi /svn1/conf/svnseve.conf<br />将下面三行前的＃去掉<br />anon-access = none            //则匿名用户不可以通过svn://方式访问档案库<br />auth-access = write     <br />password-db = passwd          //使用passwd中的用户名和密码进行认证，有一点不好的是这里面的密码输的是明文<br />authz-db = authz              //使用authz中的权限控制策略，写法如同apache中的svn-access-filename</p><p>如果想更强的安全性可以使用svn+ssh://访问机制。<br />首当用户通过svn+ssh://访问时，服务器会自动启动ssh认证机制，要求用户输入密码，对于window用户来说还需要安装第三方软件openssh，才可以采用这种机制。</p><p>2．  将代码导入项目仓库。在要导入仓库的目录上面点击右键，点击TortoiseSVN项的子菜单Import…在URl里面填写http://服务器IP/svn/project，这里project就是刚刚建立的项目仓库，</p><p>在下面填入注释，点击OK，弹出提示输入用户名密码对话框，填入flmn和password，就可以把代码导入仓库了。刚刚导入的文件并没有显示被svn管理，现在把这个目录里文件都删除，再在右键菜单里选择SVN Checkout…就可以导出代码，再看这个目录，就有个小图标在文件夹图标下面了。</p><p>3．  对于其它操作，和CVS差不多，这里就不赘述了。可以参考TortoiseSVN帮助文件。<br /><br /><br /></p><img src ="http://www.blogjava.net/zqli/aggbug/66108.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zqli/" target="_blank">放水老倌</a> 2006-08-28 10:20 <a href="http://www.blogjava.net/zqli/archive/2006/08/28/66108.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[转][译]安装基于Apache的Subversion服务器</title><link>http://www.blogjava.net/zqli/archive/2006/08/26/65893.html</link><dc:creator>放水老倌</dc:creator><author>放水老倌</author><pubDate>Sat, 26 Aug 2006 01:36:00 GMT</pubDate><guid>http://www.blogjava.net/zqli/archive/2006/08/26/65893.html</guid><wfw:comment>http://www.blogjava.net/zqli/comments/65893.html</wfw:comment><comments>http://www.blogjava.net/zqli/archive/2006/08/26/65893.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zqli/comments/commentRss/65893.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zqli/services/trackbacks/65893.html</trackback:ping><description><![CDATA[
		<strong>
				<font size="2">
						<font face="Arial">
								<span class="smalltxt">
										<span class="bold">[译]安装基于Apache的Subversion服务器</span>
								</span>
								<br />
								<br />
						</font>
				</font>
		</strong>
		<span style="FONT-SIZE: 12px">翻译整理： PCplayer<br /><br />时间：2006-08-06<br />版本：v0.1<br />关键词：subversion 安装 服务器 配置 apache<br />转载请注意原文出处、版本、作者(译者)<br />http://www.iusesvn.com/bbs/thread-158-1-1.html<br />--------------------------------------------------------------------------------<br /><br />1. 引言<br />2. 安装过程<br />2.1. 安装Apache<br />2.2. 安装Subversion<br />2.3. 配置<br /><br /><br />摘要<br /><br />本文是TortoiseSVN1.3.5帮助中关于配置服务器一节的翻译，根据行文需要做了一些调整与增减。英文原文参见TortoiseSVN1.3.5帮助的3.1. Apache Based Server。<br /><br />要使用TortoiseSVN（或者其它的Subversion客户端），你要有一个存放版本库的地方。你可以将版本库存放在本机，使用file://协议来访问，也可以将它们放在一个服务器上，使用http://或svn://协议来访问。两种服务器协议（http://和svn://）也可以被加密成https://及svn+ssh://。下面将一步一步地为你展示如何在windows上配置这样一个服务器。<br /><br />如果你没有服务器或者你只想单独地工作，那么将版本库存放在本机并使用file://协议来访问是你最好的选择，这样的话，你可以略过本文。<br /><br /><b>1. 引言</b><br />在所有的Subversion服务器配置方式中，基于Apache的是最灵活的。虽然配置起来有一点点复杂，但是它提供了其它方式所没有的好处：<br /><br /><i>WebDAV</i><br />基于Apache配置的Subversion服务器使用了被许多其它程序支持的WebDAV协议。举个例子，你可以在Windows的资源管理器中将这样的一个版本库挂载成一个“Webfolder”，然后像文件系统中的其它文件夹一样访问它。<br /><br /><i>浏览版本库</i><br />你可以在不安装Subversion客户端的情况下，使用浏览器来浏览版本库中的内容。这将使得更大范围的用户可以访问你的数据。<br /><br /><i>用户验证</i><br />你可以使用任何Apache支持的验证机制，包括SSPI和LDAP。<br /><br /><i>安全</i><br />Apache是非常的稳定和安全，因此你的版本库自然而然地拥有同样的安全性。包括SSL加密。<br /><br /><b>2. 安装过程</b><br /><b>2.1. 安装Apache</b><br />安装Apache前，你要有一台运行Windows2000、Windows XP + sp1或Windows2003的电脑。<br /><br /><i>警告</i>：请注意，没安装Service Pack 1的Windows XP将导致错误的网络数据从而破坏你的版本库！<br /><br />从<a href="http://httpd.apache.org/download.cgi" target="_blank"><font color="#003366">http://httpd.apache.org/download.cgi</font></a> 下载最新版本的Apache Web服务器。确保你下载的版本大于2.0.54。2.0.54版本的Apache将不能与Subversion 1.3.xx配合工作。而且，小于2.0.54的Apache也因为在windows上的编译存在一个bug而导致不能与subversion1.2配合使用。<br /><br />一旦你已经有了Apache2的安装程序，你可以双击它，它将引导你完成整个安装过程。请确保你输入正确的服务器URL（如果你的服务器没有DNS名称，你可以直接输入IP地址）。我建议你将Apache安装成 for all Users,on Port 80,as a service。注意：如果你已经有一个IIS或者其它的程序使用80端口，安装可能会失败。如果是这样，你可以到程序目录下的Apache Group\Apache2\conf目录中找到文件httpd.conf，将其中的Listen 80改成一个不用的端口，比如Listen 81。然后重新运行这个安装程序，这次应该不会再有问题了。<br /><br />现在你可以在你的浏览器中键入 <a href="http://loccalhost/" target="_blank"><font color="#003366">http://loccalhost</font></a>，如果呈现了一个已经配置好的网站，那么你的Apache就安装成功了。<br /><br /><i>警告</i>：<br /><br />如果你将Apache安装成一个服务，它将以本地system帐户来运行。为Apache创建一个单独的用户来运行它将会更安全一些。<br /><br />请确保运行Apache的用户有版本库的完全访问权限（右键版本库目录-&gt;属性-&gt;安全）。要不然，用户将无法提交他们的更改。<br /><br />就算Apache以本机system来运行，你也要设置它能完全读写版本库目录。<br /><br />如果没有为Apache配置这个许可，用户将会得到"禁止访问"的错误信息，在Apache的错误日志中表现为错误500。<br /><br /><b>2.2. 安装Subversion</b><br />从<a href="http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91" target="_blank"><font color="#003366">http://subversion.tigris.org/ser ... entList?folderID=91</font></a> (英文)<br />或<br /><a href="http://www.iusesvn.com/bbs/forumdisplay.php?fid=7" target="_blank"><font color="#003366">http://www.iusesvn.com/bbs/forumdisplay.php?fid=7</font></a>（中文）下载最新版本的Subversion。<br /><br />运行Subversion安装程序，如果安装程序能够识别你已经安装了Apache，那么你的安装基本上就OK了。如果它不能，那么你要做一些额外的步骤。<br /><br />使用资源管理器，进入Sibversion的安装目录（通常为c:\program files\Subversion），找到文件httpd/mod_dav_svn.so和mod_authz_svn.so，将它们拷贝到Apache的modules目录（通常为c:\program files\apache group\apache2\modules）。<br /><br />从Subversion的安装目录拷贝文件libdb43.dll到Apache的modules目录。<br /><br />使用如记事本之类的文本编辑器编辑Apache的配置文件(通常为c:\program files\apache group\apache2\conf\httd.conf)，修改以下内容：<br /><br />去掉以下行的注释（将开头的#删除）：<br /><br /><div class="smalltxt" style="FONT-WEIGHT: bold; MARGIN-LEFT: 2em; MARGIN-RIGHT: 2em"><div style="FLOAT: left">CODE:</div><div style="FLOAT: right; TEXT-ALIGN: right"><a class="smalltxt" onclick="copycode(findobj('code0'));" href="http://www.iusesvn.com/bbs/thread-158-1-1.html###"><font color="#003366">[Copy to clipboard]</font></a></div></div><div class="altbg2" id="code0" style="CLEAR: both; BORDER-RIGHT: #698cc3 1px solid; PADDING-RIGHT: 10px; BORDER-TOP: #698cc3 1px solid; PADDING-LEFT: 10px; PADDING-BOTTOM: 10px; MARGIN: 3px 2em 2em; BORDER-LEFT: #698cc3 1px solid; WORD-BREAK: break-all; PADDING-TOP: 5px; BORDER-BOTTOM: #698cc3 1px solid">#LoadModule dav_fs_module modules/mod_dav_fs.so <br />#LoadModule dav_module modules/mod_dav.so</div>在LoadModule节的最后添加以下两行：<br /><br /><div class="smalltxt" style="FONT-WEIGHT: bold; MARGIN-LEFT: 2em; MARGIN-RIGHT: 2em"><div style="FLOAT: left">CODE:</div><div style="FLOAT: right; TEXT-ALIGN: right"><a class="smalltxt" onclick="copycode(findobj('code1'));" href="http://www.iusesvn.com/bbs/thread-158-1-1.html###"><font color="#003366">[Copy to clipboard]</font></a></div></div><div class="altbg2" id="code1" style="CLEAR: both; BORDER-RIGHT: #698cc3 1px solid; PADDING-RIGHT: 10px; BORDER-TOP: #698cc3 1px solid; PADDING-LEFT: 10px; PADDING-BOTTOM: 10px; MARGIN: 3px 2em 2em; BORDER-LEFT: #698cc3 1px solid; WORD-BREAK: break-all; PADDING-TOP: 5px; BORDER-BOTTOM: #698cc3 1px solid">LoadModule dav_svn_module modules/mod_dav_svn.so <br />LoadModule authz_svn_module modules/mod_authz_svn.so</div><b>2.3. 配置</b><br />现在，你已经安装了Apache和Subversion，但是Apache还不知道如果处理像TortoiseSVN一样的Subversion客户端。要让Apache知道哪个URL将被Subversion使用，你要像下面这样编辑Apache的配置文件（通常在c:\program files\apache group\apache2\conf\httpd.conf）：<br /><br />在配置文件的最后添加下面这些行：<br /><br /><div class="smalltxt" style="FONT-WEIGHT: bold; MARGIN-LEFT: 2em; MARGIN-RIGHT: 2em"><div style="FLOAT: left">CODE:</div><div style="FLOAT: right; TEXT-ALIGN: right"><a class="smalltxt" onclick="copycode(findobj('code2'));" href="http://www.iusesvn.com/bbs/thread-158-1-1.html###"><font color="#003366">[Copy to clipboard]</font></a></div></div><div class="altbg2" id="code2" style="CLEAR: both; BORDER-RIGHT: #698cc3 1px solid; PADDING-RIGHT: 10px; BORDER-TOP: #698cc3 1px solid; PADDING-LEFT: 10px; PADDING-BOTTOM: 10px; MARGIN: 3px 2em 2em; BORDER-LEFT: #698cc3 1px solid; WORD-BREAK: break-all; PADDING-TOP: 5px; BORDER-BOTTOM: #698cc3 1px solid">&lt;Location /svn&gt; <br />SVNParentPath D:\SVN <br />AuthType Basic <br />AuthName "Subversion repositories" <br />AuthUserFile D:\passwd <br />#AuthzSVNAccessFile D:\svnaccessfile <br />Require valid-user <br />&lt;/Location&gt;</div>这样配置表示：你所有的版本库将位于D:\SVN目录下，要访问你的版本库可以使用这样的URL：<a href="http://myserver/svn/" target="_blank"><font color="#003366">http://MyServer/svn/</font></a>，访问权限将由passwd文件中的用户名/密码来限制。<br /><br />要创建passwd文件，可以打开命令行(DOS窗口)，将当前目录切换到apache2目录（通常为c:\program files\apache group\apache2），然后打入以下命令以创建文件：<br /><br /><div class="smalltxt" style="FONT-WEIGHT: bold; MARGIN-LEFT: 2em; MARGIN-RIGHT: 2em"><div style="FLOAT: left">CODE:</div><div style="FLOAT: right; TEXT-ALIGN: right"><a class="smalltxt" onclick="copycode(findobj('code3'));" href="http://www.iusesvn.com/bbs/thread-158-1-1.html###"><font color="#003366">[Copy to clipboard]</font></a></div></div><div class="altbg2" id="code3" style="CLEAR: both; BORDER-RIGHT: #698cc3 1px solid; PADDING-RIGHT: 10px; BORDER-TOP: #698cc3 1px solid; PADDING-LEFT: 10px; PADDING-BOTTOM: 10px; MARGIN: 3px 2em 2em; BORDER-LEFT: #698cc3 1px solid; WORD-BREAK: break-all; PADDING-TOP: 5px; BORDER-BOTTOM: #698cc3 1px solid">bin\htpasswd -c passwd &lt;username&gt;</div>重启Apache服务。<br /><br />将你的浏览器指向<a href="http://myserver/svn/MyNewRepository(MyNewRepository" target="_blank"><font color="#003366">http://MyServer/svn/MyNewRepository(MyNewRepository</font></a>是你之前创建的Subversion版本库)。如果一切正常，你将被提示输入用户名密码，输入正确的用户名密码后你就可以看到版本库中的内容了。<br /><br />对你刚刚输入的apache配置作一些简短的说明：<br /><br /><i>&lt;Location /svn&gt;</i><br /><br />意味着可以通过像这样的URL(<a href="http://myserver/svn)" target="_blank"><font color="#003366">http://MyServer/svn)</font></a>来访问Subversion版本库<br /><br /><i>DAV svn</i><br /><br />告诉Apache哪个模块负责服务像那样的URL－－在这里就是Subversion模块<br /><br /><i>SVNListParentPath on</i><br /><br />在Subversion 1.3及更高版本中，这个指示器使得Subversion列出由SVNParentPath指定的目录下所有的版本库<br /><br /><i>SVNParentPath D:\SVN</i><br /><br />告诉Subversion在目录D:\SVN下寻找版本库<br /><br /><i>AuthType Basic</i><br /><br />启用基本的验证，比如用户名/密码对<br /><br /><i>AuthName "Subversion repositories"</i><br /><br />当一个验证对话框弹出时，告诉用户这个验证是用来做什么的<br /><br /><i>AuthUserFile D:\passwd</i><br /><br />指定D:\passwd用为密码文件用来验证用户的用户名及密码<br /><br /><i>AuthzSVNAccessFile D:\svnaccessfile</i><br /><br />指定D:\svnaccessfile来限定各个用户或组在版本库中目录的访问权限<br /><br /><i>Require valid-user</i><br /><br />限定用户只有输入正确的用户名及密码后才能访问这个路径<br /><br />----------------------------------------<br /><br />上面的配置仅仅是一个简单的示例。你还可以对Apache进行许许多多的配置。<br /><br />1如果你想让所有用户对版本库都有读的权限而只有特定的用户才有写的权限，你可以将这行<br /><br /><div class="smalltxt" style="FONT-WEIGHT: bold; MARGIN-LEFT: 2em; MARGIN-RIGHT: 2em"><div style="FLOAT: left">CODE:</div><div style="FLOAT: right; TEXT-ALIGN: right"><a class="smalltxt" onclick="copycode(findobj('code4'));" href="http://www.iusesvn.com/bbs/thread-158-1-1.html###"><font color="#003366">[Copy to clipboard]</font></a></div></div><div class="altbg2" id="code4" style="CLEAR: both; BORDER-RIGHT: #698cc3 1px solid; PADDING-RIGHT: 10px; BORDER-TOP: #698cc3 1px solid; PADDING-LEFT: 10px; PADDING-BOTTOM: 10px; MARGIN: 3px 2em 2em; BORDER-LEFT: #698cc3 1px solid; WORD-BREAK: break-all; PADDING-TOP: 5px; BORDER-BOTTOM: #698cc3 1px solid">Require valid-user</div>改为<br /><br /><div class="smalltxt" style="FONT-WEIGHT: bold; MARGIN-LEFT: 2em; MARGIN-RIGHT: 2em"><div style="FLOAT: left">CODE:</div><div style="FLOAT: right; TEXT-ALIGN: right"><a class="smalltxt" onclick="copycode(findobj('code5'));" href="http://www.iusesvn.com/bbs/thread-158-1-1.html###"><font color="#003366">[Copy to clipboard]</font></a></div></div><div class="altbg2" id="code5" style="CLEAR: both; BORDER-RIGHT: #698cc3 1px solid; PADDING-RIGHT: 10px; BORDER-TOP: #698cc3 1px solid; PADDING-LEFT: 10px; PADDING-BOTTOM: 10px; MARGIN: 3px 2em 2em; BORDER-LEFT: #698cc3 1px solid; WORD-BREAK: break-all; PADDING-TOP: 5px; BORDER-BOTTOM: #698cc3 1px solid">&lt;LimitExcept GET PROPFIND OPTIONS REPORT&gt;<br />Require valid-user<br />&lt;/LimitExcept&gt;</div>2上面的配置使用了passwd文件将你所有的版本库作为一个单元来限定访问权限。如果你想获得更多的控制，如限定某个用户可以访问版本库中的哪个目录，可以把下面这行的#去掉：<br /><br /><div class="smalltxt" style="FONT-WEIGHT: bold; MARGIN-LEFT: 2em; MARGIN-RIGHT: 2em"><div style="FLOAT: left">CODE:</div><div style="FLOAT: right; TEXT-ALIGN: right"><a class="smalltxt" onclick="copycode(findobj('code6'));" href="http://www.iusesvn.com/bbs/thread-158-1-1.html###"><font color="#003366">[Copy to clipboard]</font></a></div></div><div class="altbg2" id="code6" style="CLEAR: both; BORDER-RIGHT: #698cc3 1px solid; PADDING-RIGHT: 10px; BORDER-TOP: #698cc3 1px solid; PADDING-LEFT: 10px; PADDING-BOTTOM: 10px; MARGIN: 3px 2em 2em; BORDER-LEFT: #698cc3 1px solid; WORD-BREAK: break-all; PADDING-TOP: 5px; BORDER-BOTTOM: #698cc3 1px solid">#AuthzSVNAccessFile D:\svnaccessfile</div>然后创建一个Subversion授权文件。Apache将确保只有有效的用户可以访问你的/svn位置，然后将用户名传到AuthzSVNAccessFile模块，这样可以依据Subversion授权文件得到更精细的权限控制。注意，路径将被指定为[库:路径]或者简单的[路径]。如果你不明确指定一个库，访问规则将应用到由SVNParentPath指定的目录下所有的版本库中。一个例子可能像这样：<br /><br /><div class="smalltxt" style="FONT-WEIGHT: bold; MARGIN-LEFT: 2em; MARGIN-RIGHT: 2em"><div style="FLOAT: left">CODE:</div><div style="FLOAT: right; TEXT-ALIGN: right"><a class="smalltxt" onclick="copycode(findobj('code7'));" href="http://www.iusesvn.com/bbs/thread-158-1-1.html###"><font color="#003366">[Copy to clipboard]</font></a></div></div><div class="altbg2" id="code7" style="CLEAR: both; BORDER-RIGHT: #698cc3 1px solid; PADDING-RIGHT: 10px; BORDER-TOP: #698cc3 1px solid; PADDING-LEFT: 10px; PADDING-BOTTOM: 10px; MARGIN: 3px 2em 2em; BORDER-LEFT: #698cc3 1px solid; WORD-BREAK: break-all; PADDING-TOP: 5px; BORDER-BOTTOM: #698cc3 1px solid">[groups]<br />admin = john, kate<br />devteam1 = john, rachel, sally<br />devteam2 = kate, peter, mark<br />docs = bob, jane, mike<br />training = zak<br /><br /># 为所有库指定默认访问规则<br /># 所有人可以读，管理员可以写，危险分子没有任何权限<br />[/]<br />* = r<br />@admin = rw<br />dangerman =<br /><br /># 允许开发人员可以完全访问他们的项目版本库<br />[proj1:/]<br />@devteam1 = rw<br />[proj2:/]<br />@devteam2 = rw<br />[bigproj:/]<br />@devteam1 = rw<br />@devteam2 = rw<br />trevor = rw<br /><br /># 文档编写人员对所有的docs目录有写权限<br />[/trunk/doc]<br />@docs = rw<br /><br /># 培训人员可以完全访问培训版本库<br />[TrainingRepos:/]<br />@training = rw</div><span style="FONT-SIZE: 12px">以上介绍的配置为Apache多库方式，即一个location可以同时为多个版本库服务，<br />假设你的ip为192.168.0.1，在D:\SVN目录下建了两个版本库，proj1和proj2<br />可以分别用下面两个url来访问你的版本库<br /><br /><div class="smalltxt" style="FONT-WEIGHT: bold; MARGIN-LEFT: 2em; MARGIN-RIGHT: 2em"><div style="FLOAT: left">CODE:</div><div style="FLOAT: right; TEXT-ALIGN: right"><a class="smalltxt" onclick="copycode(findobj('code8'));" href="http://www.iusesvn.com/bbs/thread-158-1-1.html###"><font color="#003366">[Copy to clipboard]</font></a></div></div><div class="altbg2" id="code8" style="CLEAR: both; BORDER-RIGHT: #698cc3 1px solid; PADDING-RIGHT: 10px; BORDER-TOP: #698cc3 1px solid; PADDING-LEFT: 10px; PADDING-BOTTOM: 10px; MARGIN: 3px 2em 2em; BORDER-LEFT: #698cc3 1px solid; WORD-BREAK: break-all; PADDING-TOP: 5px; BORDER-BOTTOM: #698cc3 1px solid">http://192.168.0.1/svn/proj1</div><br /><br /><div class="smalltxt" style="FONT-WEIGHT: bold; MARGIN-LEFT: 2em; MARGIN-RIGHT: 2em"><div style="FLOAT: left">CODE:</div><div style="FLOAT: right; TEXT-ALIGN: right"><a class="smalltxt" onclick="copycode(findobj('code9'));" href="http://www.iusesvn.com/bbs/thread-158-1-1.html###"><font color="#003366">[Copy to clipboard]</font></a></div></div><div class="altbg2" id="code9" style="CLEAR: both; BORDER-RIGHT: #698cc3 1px solid; PADDING-RIGHT: 10px; BORDER-TOP: #698cc3 1px solid; PADDING-LEFT: 10px; PADDING-BOTTOM: 10px; MARGIN: 3px 2em 2em; BORDER-LEFT: #698cc3 1px solid; WORD-BREAK: break-all; PADDING-TOP: 5px; BORDER-BOTTOM: #698cc3 1px solid">http://192.168.0.1/svn/proj1</div>还有一种配置方式为Apache单库方式，即一个location只能为一个版本库服务，<br />配置时只要将上面的SVNParentPath改为SVNPath，同时将后面的路径由版本库的父目录改为版本库的目录<br />如：<br /><br /><div class="smalltxt" style="FONT-WEIGHT: bold; MARGIN-LEFT: 2em; MARGIN-RIGHT: 2em"><div style="FLOAT: left">CODE:</div><div style="FLOAT: right; TEXT-ALIGN: right"><a class="smalltxt" onclick="copycode(findobj('code10'));" href="http://www.iusesvn.com/bbs/thread-158-1-1.html###"><font color="#003366">[Copy to clipboard]</font></a></div></div><div class="altbg2" id="code10" style="CLEAR: both; BORDER-RIGHT: #698cc3 1px solid; PADDING-RIGHT: 10px; BORDER-TOP: #698cc3 1px solid; PADDING-LEFT: 10px; PADDING-BOTTOM: 10px; MARGIN: 3px 2em 2em; BORDER-LEFT: #698cc3 1px solid; WORD-BREAK: break-all; PADDING-TOP: 5px; BORDER-BOTTOM: #698cc3 1px solid">&lt;Location /svn&gt; <br />SVNPath D:\SVN\proj1 <br />AuthType Basic <br />AuthName "Subversion repositories" <br />AuthUserFile D:\passwd <br />#AuthzSVNAccessFile D:\svnaccessfile <br />Require valid-user <br />&lt;/Location&gt;</div>这时，可以用下面的URL来访问版本库proj1<br /><br /><div class="smalltxt" style="FONT-WEIGHT: bold; MARGIN-LEFT: 2em; MARGIN-RIGHT: 2em"><div style="FLOAT: left">CODE:</div><div style="FLOAT: right; TEXT-ALIGN: right"><a class="smalltxt" onclick="copycode(findobj('code11'));" href="http://www.iusesvn.com/bbs/thread-158-1-1.html###"><font color="#003366">[Copy to clipboard]</font></a></div></div><div class="altbg2" id="code11" style="CLEAR: both; BORDER-RIGHT: #698cc3 1px solid; PADDING-RIGHT: 10px; BORDER-TOP: #698cc3 1px solid; PADDING-LEFT: 10px; PADDING-BOTTOM: 10px; MARGIN: 3px 2em 2em; BORDER-LEFT: #698cc3 1px solid; WORD-BREAK: break-all; PADDING-TOP: 5px; BORDER-BOTTOM: #698cc3 1px solid">http://192.168.0.1/svn</div></span></span>
<img src ="http://www.blogjava.net/zqli/aggbug/65893.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zqli/" target="_blank">放水老倌</a> 2006-08-26 09:36 <a href="http://www.blogjava.net/zqli/archive/2006/08/26/65893.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[转]Subversion 的一些第三方工具 </title><link>http://www.blogjava.net/zqli/archive/2006/08/24/65575.html</link><dc:creator>放水老倌</dc:creator><author>放水老倌</author><pubDate>Thu, 24 Aug 2006 09:09:00 GMT</pubDate><guid>http://www.blogjava.net/zqli/archive/2006/08/24/65575.html</guid><wfw:comment>http://www.blogjava.net/zqli/comments/65575.html</wfw:comment><comments>http://www.blogjava.net/zqli/archive/2006/08/24/65575.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zqli/comments/commentRss/65575.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zqli/services/trackbacks/65575.html</trackback:ping><description><![CDATA[
		<table class="border2" cellspacing="0" cellpadding="0" width="760" align="center" border="0">
				<tbody>
						<tr>
								<td align="middle" bgcolor="#f1f1f1" height="25">作者:<font color="#0e3e92">未知</font> 时间:<font color="#0e3e92">2005-09-13 23:54</font> 出处:<font color="#0e3e92">Blog.ChinaUnix.net</font> 责编:<font color="#0e3e92">chinaitpower</font></td>
						</tr>
						<tr>
								<td bgcolor="#d6d6d6" height="1">
								</td>
						</tr>
						<tr>
								<td bgcolor="#ffffff" height="25">              摘要：Subversion 的一些第三方工具</td>
						</tr>
						<tr>
								<td bgcolor="#d6d6d6" height="1">
								</td>
						</tr>
				</tbody>
		</table>
		<table class="border2" cellspacing="0" cellpadding="0" width="760" align="center" bgcolor="#ffffff" border="0">
				<tbody>
						<tr>
								<td align="middle" height="25">
										<table width="95%">
												<tbody>
														<tr>
																<td>
																		<table align="left" border="0">
																				<tbody>
																						<tr>
																								<td>
																										<script language="javascript" src="httP://www.iiippp.net/images/ad.js" charset="utf-8">
																										</script>
																								</td>
																						</tr>
																				</tbody>
																		</table>  Subversion 的模块化设计（在"分层化设计"一节中有描述）以及与其他语言的绑定的能力（在"使用 C 和 C++ 之外的语言"一节中有介绍）使得它很适合作为其他软件的扩展或是支持模块。在这个附录中，我们将简单的介绍一些使用 Subversion 的第三方的软件。<br />    如果你想获得这部分信息的最新的版本，请查阅 Subversion 站点的链接页（<a href="http://subversion.tigris.org/project_links.html">http://subversion.tigris.org/project_links.html</a>）。<br /><p>D.1 客户端和插件 </p><p>    AnkhSVN （<a href="http://ankhsvn.tigris.org/">http://ankhsvn.tigris.org/</a>）<br />        微软 Visual Studio .NET 的 Subversion 插件</p><p>    JSVN （<a href="http://jsvn.alternatecomputing.com/">http://jsvn.alternatecomputing.com/</a>）<br />        Java Subversion 客户端，包含一个 IDEA 的插件</p><p>    psvn.el （<a href="http://xsteve.nit.at/prg/vc_svn/">http://xsteve.nit.at/prg/vc_svn/</a>）<br />        Emacs 的 Subversion 接口</p><p>    RapidSVN （<a href="http://rapidsvn.tigris.org/">http://rapidsvn.tigris.org/</a>）<br />        基于 WxPython libraries 的跨平台的 Subversion 图形化客户端</p><p>    Subclipse （<a href="http://subclipse.tigris.org/">http://subclipse.tigris.org/</a>）<br />        Eclipse 下的 Subversion 插件</p><p>    Subway （<a href="http://nidaros.homedns.org/subway/">http://nidaros.homedns.org/subway/</a>）<br />        Microsoft SCC provider for Subversion</p><p>    sourcecross.org （<a href="http://www.sourcecross.org/">http://www.sourcecross.org/</a>）<br />        Microsoft SCC provider for Subversion</p><p>    Supervision （<a href="http://supervision.tigris.org/">http://supervision.tigris.org/</a>）<br />        Subversion 的 Java/Swing 图形化客户端</p><p>    Sven （<a href="http://www.nikwest.de/Software/#SvenOverview">http://www.nikwest.de/Software/#SvenOverview</a>）<br />        使用 Mac OS X Cocoa 框架开发的 Subversion 图形化客户端</p><p>    Svn4Eclipse （<a href="http://svn4eclipse.tigris.org/">http://svn4eclipse.tigris.org/</a>）<br />        为 Eclipse IDE 设计的 Subversion 插件</p><p>    Svn-Up （<a href="http://svnup.tigris.org/">http://svnup.tigris.org/</a>）<br />        基于 Java 的 Subversion 以及 IDEA IDE 的插件<br />    <br />    TortoiseSVN （<a href="http://tortoisesvn.tigris.org/">http://tortoisesvn.tigris.org/</a>）<br />        作为微软 Windows 外壳扩展设计的 Subversion 客户端<br />    <br />    WorkBench （<a href="http://pysvn.tigris.org/">http://pysvn.tigris.org/</a>）<br />        在 Subversion 基础上构建的基于 Python 的跨平台软件设计环境</p><p>D.2 和语言的绑定</p><p>    PySVN （<a href="http://pysvn.tigris.org/">http://pysvn.tigris.org/</a>）<br />        供 Python 使用的面对对象的 Subversion 客户端 API 项目</p><p>    Subversion （<a href="http://subversion.tigris.org/">http://subversion.tigris.org/</a>）<br />        供 Python、Perl、和 Java 使用的 Subversion API；对应于核心的 C API</p><p>    SVNCPP （<a href="http://rapidsvn.tigris.org/">http://rapidsvn.tigris.org/</a>）<br />        供 C++ 的面对对象的 Subversion 客户端 API</p><p>D.3 仓库转换工具</p><p>    cvs2svn （<a href="http://cvs2svn.tigris.org/">http://cvs2svn.tigris.org/</a>）<br />        从 CVS 到 Subversion 的转换</p><p>    vss2svn （<a href="http://vss2svn.tigris.org/">http://vss2svn.tigris.org/</a>）<br />        从 Microsoft SourceSafe 到 Subversion 的转换<br />   <br />    Subversion VCP Plugin （<a href="http://svn.clkao.org/revml/branches/svn-perl/">http://svn.clkao.org/revml/branches/svn-perl/</a>）<br />        从 CVS 到 Subversion 转换的 VCP 插件</p><p>D.4 更高领域的一些工具</p><p>    Kwiki （<a href="http://www.kwiki.org/">http://www.kwiki.org/</a>）<br />        带有 Subversion 备份支持的 Wiki</p><p>    Scmbug （<a href="http://freshmeat.net/projects/scmbug/">http://freshmeat.net/projects/scmbug/</a>）<br />        集成了漏洞跟踪的软件配置管理系统，支持 Subversion</p><p>    Subissue （<a href="http://subissue.tigris.org/">http://subissue.tigris.org/</a>）<br />        直接在 Subversion 仓库中跟踪发布</p><p>    Subwiki （<a href="http://subwiki.tigris.org/">http://subwiki.tigris.org/</a>）<br />        使用 Subversion 作为数据仓库 的 Wiki</p><p>    svk （<a href="http://svk.elixus.org/">http://svk.elixus.org/</a>）<br />        基于 Subversion 的分散式的 版本控制系统</p><p>    submaster （<a href="http://www.rocklinux.org/submaster.html">http://www.rocklinux.org/submaster.html</a>）<br />        基于 Subversion 的分布式的软件开发系统</p><p>D.5 仓库浏览工具</p><p>    SVN::Web （<a href="http://svn.elixus.org/repos/member/clkao/">http://svn.elixus.org/repos/member/clkao/</a>）<br />        基于 Perl 的 Subversion 仓库 Web 接口</p><p>    ViewCVS （<a href="http://viewcvs.sourceforge.net/">http://viewcvs.sourceforge.net/</a>）<br />        基于 Python 的 CGI 脚本，用来浏览 CVS 和 Subversion 仓库</p><p>    WebSVN （<a href="http://websvn.tigris.org/">http://websvn.tigris.org/</a>）<br />        基于 PHP 的 Subversion 第三方仓库浏览工具</p><p>    Trac （<a href="http://projects.edgewall.com/trac">http://projects.edgewall.com/trac</a>）<br />        基于 Web 的软件项目管理、漏洞跟踪、发布系统，使用版本控制系统接口，并且集成了 Wiki 支持<br /><br />（笔记：<a href="http://www.iusesvn.com/">http://www.iusesvn.com/</a>）</p></td>
														</tr>
												</tbody>
										</table>
								</td>
						</tr>
				</tbody>
		</table>
<img src ="http://www.blogjava.net/zqli/aggbug/65575.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zqli/" target="_blank">放水老倌</a> 2006-08-24 17:09 <a href="http://www.blogjava.net/zqli/archive/2006/08/24/65575.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>