加勒比av一区二区,国产精品精品久久久,精品视频一二三http://www.aygfsteel.com/zqli/category/14440.html為學日益,為道日損。zh-cnTue, 27 Feb 2007 10:29:29 GMTTue, 27 Feb 2007 10:29:29 GMT60Subversion's design documents-bubble-up methodhttp://www.aygfsteel.com/zqli/archive/2006/11/13/80834.html放水老倌放水老倌Mon, 13 Nov 2006 02:40:00 GMThttp://www.aygfsteel.com/zqli/archive/2006/11/13/80834.htmlhttp://www.aygfsteel.com/zqli/comments/80834.htmlhttp://www.aygfsteel.com/zqli/archive/2006/11/13/80834.html#Feedback0http://www.aygfsteel.com/zqli/comments/commentRss/80834.htmlhttp://www.aygfsteel.com/zqli/services/trackbacks/80834.html
Bubble-Up Method

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.

Suppose we have a new project, at revision 1, looking like this (using CVS syntax):

prompt$ svn checkout myproj
U myproj/
U myproj/B
U myproj/A
U myproj/A/fish
U myproj/A/fish/tuna
prompt$

Only the file tuna is a regular file, everything else in myproj is a directory.

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).

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.

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.

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:

                    ( 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.) */
                   |________|

What happens when we modify tuna and commit? First, we make a new tuna node, containing the latest text. The new node is not connected to anything yet, it's just hanging out there in space:

                         ________
                        |F       |
                        |        |
                        |        |
                        |________|

Next, we create a new revision of its parent directory:

                 ________
                |D       |
                |        |
                | tuna   |
                |___\____|
                     \
                      \
                    ___\____
                   |F       |
                   |        |
                   |        |
                   |________|

We continue up the line, creating a new revision of the next parent directory:

              ________
             |D       |
             |        |
             | fish   |
             |___\____|
                  \
                   \
                 ___\____
                |D       |
                |        |
                | tuna   |
                |___\____|
                     \
                      \
                    ___\____
                   |F       |
                   |        |
                   |        |
                   |________|

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 old directory B node!

       ______________________________________________________
      |___1_______2________3________4________5_________6_____...
          |
          |
       ___|_____             ________
      |D        |           |D       |
      |         |           |        |
      |   A     |           |   A    |
      |    \    |           |    \   |
      |   B \   |           |   B \  |
      |__/___\__|           |__/___\_|
        /     \               /     \
       |    ___\_____________/       \
       |   /    \                     \
    ___|__/   ___\____              ___\____
   |D      | |D       |            |D       |
   |       | |        |            |        |
   |       | | fish   |            | fish   |
   |_______| |___\____|            |___\____|
                  \                     \
                   \                     \
                 ___\____              ___\____
                |D       |            |D       |
                |        |            |        |
                | tuna   |            | tuna   |
                |___\____|            |___\____|
                     \                     \
                      \                     \
                    ___\____              ___\____
                   |F       |            |F       |
                   |        |            |        |
                   |        |            |        |
                   |________|            |________|

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.

       ______________________________________________________
      |___1_______2________3________4________5_________6_____...
          |        \
          |         \__________
       ___|_____             __\_____
      |D        |           |D       |
      |         |           |        |
      |   A     |           |   A    |
      |    \    |           |    \   |
      |   B \   |           |   B \  |
      |__/___\__|           |__/___\_|
        /     \               /     \
       |    ___\_____________/       \
       |   /    \                     \
    ___|__/   ___\____              ___\____
   |D      | |D       |            |D       |
   |       | |        |            |        |
   |       | | fish   |            | fish   |
   |_______| |___\____|            |___\____|
                  \                     \
                   \                     \
                 ___\____              ___\____
                |D       |            |D       |
                |        |            |        |
                | tuna   |            | tuna   |
                |___\____|            |___\____|
                     \                     \
                      \                     \
                    ___\____              ___\____
                   |F       |            |F       |
                   |        |            |        |
                   |        |            |        |
                   |________|            |________|

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.

Many nice behaviors come from this model:

  1. Easy reads. If a filesystem reader wants to locate revision X of file foo.c, it need only traverse the repository's history, locate revision X's root node, then walk down the tree to foo.c.

  2. Writers don't interfere with readers. 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.

  3. File structure is versioned. 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.

Let's demonstrate the last point by renaming the tuna to book.

We start by creating a new parent “fish” directory, except that this parent directory has a different dir_entry, one which points the same old file node, but has a different name:

       ______________________________________________________
      |___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       |
                   |        |            |        |
                   |        |            |        |
                   |________|            |________|

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:

       ______________________________________________________
      |___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       |
                   |        |            |        |
                   |        |            |        |
                   |________|            |________|

For our last example, we'll demonstrate the way “tags” and “branches” are implemented in the repository.

In a nutshell, they're one and the same thing. Because nodes are so easily shared, we simply create a new 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 clone, or more colloquially, a “cheap copy”.

Let's go back to our original tree, assuming that we're at revision 6 to begin with:

       ______________________________________________________
    ...___6_______7________8________9________10_________11_____...
          |
          |
       ___|_____
      |D        |
      |         |
      |   A     |
      |    \    |
      |   B \   |
      |__/___\__|
        /     \
       |       \
       |        \
    ___|___   ___\____
   |D      | |D       |
   |       | |        |
   |       | | fish   |
   |_______| |___\____|
                  \
                   \
                 ___\____
                |D       |
                |        |
                | tuna   |
                |___\____|
                     \
                      \
                    ___\____
                   |F       |
                   |        |
                   |        |
                   |________|

Let's “tag” directory A. To make the clone, we create a new dir_entry T in our root, pointing to A's node:

       ______________________________________________________
      |___6_______7________8________9________10_________11_____...
          |        \
          |         \
       ___|_____   __\______
      |D        | |D        |
      |         | |         |
      |   A     | |    A    |
      |    \    | |    |    |
      |   B \   | |  B |  T |
      |__/___\__| |_/__|__|_|
        /     \    /   |  |
       |    ___\__/   /  /
       |   /    \    /  /
    ___|__/   ___\__/_ /
   |D      | |D       |
   |       | |        |
   |       | | fish   |
   |_______| |___\____|
                  \
                   \
                 ___\____
                |D       |
                |        |
                | tuna   |
                |___\____|
                     \
                      \
                    ___\____
                   |F       |
                   |        |
                   |        |
                   |________|

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 always point to a particular pristine revision of directory A at some point in time. Thus, T is a tag.

(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.)

However, if we do 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.

License — Copyright

Copyright ? 2000-2006 Collab.Net. All rights reserved.

This software is licensed as described in the file COPYING, which you should have received as part of this distribution. The terms are also available at http://subversion.tigris.org/license-1.html. If newer versions of this license are posted there, you may use a newer version instead, at your option.

track:http://subversion.tigris.org/design.html#server.fs.struct.bubble-up



放水老倌 2006-11-13 10:40 發表評論
]]>
[轉]manpage of htpasswdhttp://www.aygfsteel.com/zqli/archive/2006/08/29/66366.html放水老倌放水老倌Tue, 29 Aug 2006 02:30:00 GMThttp://www.aygfsteel.com/zqli/archive/2006/08/29/66366.htmlhttp://www.aygfsteel.com/zqli/comments/66366.htmlhttp://www.aygfsteel.com/zqli/archive/2006/08/29/66366.html#Feedback0http://www.aygfsteel.com/zqli/comments/commentRss/66366.htmlhttp://www.aygfsteel.com/zqli/services/trackbacks/66366.htmlNAME(名稱)htpasswd - 創建和更新用戶認證文件 ?

SYNOPSIS(總覽)

htpasswd [ -c ] [ -m | -d | -s | -p ] passwdfileusername
htpasswd-b [ -c ] [ -m | -d | -s | -p ] passwdfileusernamepassword?

DESCRIPTION(描述)

htpasswd 用來創建和更新保存著 HTTP用戶基本認證的用戶和密碼的平面文件. 如果 htpasswd 不能訪問文件,那么就不可能寫入到輸出文件, 也不可能讀取文件以更新它, 它會返回錯誤狀態并不作任何修改.

httpd Apache web服務器獲取的資源只限于由 htpasswd 創建的文件中所列出的用戶使用. 該程序只能用于用戶名保存在平面文件的情況下. 要使用DBM數據庫,請參看 dbmmanage.

htpasswd 的加密密碼既可以使用針對Apache修改的MD5版本, 也可以使用系統的crypt()程序. 由 htpasswd 管理的文件可能同時包含兩種類型的密碼; 一些用戶記錄可使用MD5加密的密碼, 而另一些用戶記錄可在同一文件中使用通過 crypt()加密的密碼.

該手冊頁只列出了命令行的參數. 要獲得關于在 httpd 中配置用戶認證的必要指令的詳細情況, 可參看Apache手冊,它是Apache發布版本的一部分,你也可以在 <URL:http://www.apache.org/>上找到它. ?

OPTIONS(選項)

-b
使用批處理模式;也即,從命令行上獲取密碼而不給出提示.該選項在使用時應特別小心, 因為密碼是在命令行上清楚可見的.
-c
創建passwdfile.如果passwdfile 已經存在,那么它會重新寫入并刪去原有內容.
-m
密碼使用Apache修改的MD5算法. 使用這種算法加密的密碼可以移植到運行Apache 1.3.9或更新版本的任何平臺上(Windows,Unix,BeOS,等等). 在Windows和TPF上,該標識是默認的.
-d
密碼使用crypt()加密.這是除了Windows和TPF 之外的所有平臺上的默認值.盡管這可被所有平臺上的 htpasswd 支持,卻不被Windows和TPF上的 httpd 服務器所支持.
-s
密碼使用SHA加密方法.這種方式移植于Netscape服務器, 使用的是LDAP目錄交換格式(ldif).
-p
使用普通文本格式的密碼.盡管 htpasswd 可支持在所有平臺上創建這種格式的密碼, 卻只有Windows和TPF上的 httpd 守護程序能夠接受普通文本密碼.
passwdfile
包含用戶名和密碼的文件的名字. 如果給定了-c,那么會在其不存在的情況下創建該文件, 或者在其存在的情況下重新寫入并刪去原有內容.
username
passwdfile中創建或更新的用戶名. 如果username在文件中不存在, 即創建一條記錄. 如果已經存在,則修改其密碼.
password
文件中加密和存儲的普通文本格式的密碼. 只用于-b標識.
?

EXIT STATUS(退出狀態)

如果在passwdfile中用戶名和密碼添加或更新成功, htpasswd 返回0狀態("true"). 如果在存取文件時遇到某些問題 htpasswd 返回1, 如果在命令行中有語法錯誤, htpasswd 返回2, 如果交互式輸入的密碼與其驗證項不匹配, htpasswd 返回3, 如果操作被中斷, htpasswd 返回4, 如果某個值(用戶名,文件名,密碼或最終計算出的記錄)太長, htpasswd 返回5, 如果用戶名包含無效的字符(參看RESTRICTIONS部分), htpasswd 返回6. ?

EXAMPLES(示例)

htpasswd /usr/local/etc/apache/.htpasswd-users jsmith
為用戶jsmith添加或修改密碼. 會給出用戶輸入密碼的提示. 如果在Windows系統上執行, 密碼會使用修改的Apache MD5算法加密; 否則,會使用系統的 crypt()程序. 如果文件不存在, htpasswd 會不作任何修改并返回一條錯誤提示.

htpasswd -c /home/doe/public_html/.htpasswd jane

創建一個新的文件并將用戶jane記錄保存在其中. 會給出用戶輸入密碼的提示. 如果文件存在但不能夠讀取,或者不能夠寫入, 那么它不會作修改,而且 htpasswd 會顯示一條消息并返回一個錯誤狀態.

htpasswd -mb /usr/web/.htpasswd-all jones Pwd4Steve

使用MD5算法加密取自命令行的密碼, 并將其保存到指定的文件中.

SECURITY CONSIDERATIONS(安全考慮)

Web密碼文件如由 htpasswd 管理的這些應該在Web服務器的URI空間范圍之內 -- 也就是說, 瀏覽器不應該能夠獲取他們.

建議不要使用-b選項,因為使用該選項時未加密的密碼出現在了命令行上. ?

RESTRICTIONS(限制)

在Windows和MPE平臺上,使用 htpasswd 加密的密碼的長度限制在255個字符以內. 超出此長度的密碼會取前255個字符.

使用的MD5算法是Apache軟件特有的; 使用它加密的密碼對于其他Web服務器來說是不可用的.

用戶名限制在255個字節以內,而且不能包含字符':'. q.SH SEE ALSO(另見) httpd(8) 以及隨發布版本所帶的support/SHA1下的腳本.



放水老倌 2006-08-29 10:30 發表評論
]]>
Apache2+Subversion1.3.x安裝手記http://www.aygfsteel.com/zqli/archive/2006/08/28/66108.html放水老倌放水老倌Mon, 28 Aug 2006 02:20:00 GMThttp://www.aygfsteel.com/zqli/archive/2006/08/28/66108.htmlhttp://www.aygfsteel.com/zqli/comments/66108.htmlhttp://www.aygfsteel.com/zqli/archive/2006/08/28/66108.html#Feedback0http://www.aygfsteel.com/zqli/comments/commentRss/66108.htmlhttp://www.aygfsteel.com/zqli/services/trackbacks/66108.html第一次安裝Subversion,在昨天的安裝過程中,出現了一些問題:
第一步,安裝Apache+Subversion
?????? 首先,我選擇了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下面安裝,其官方下載頁面也有提示說:Note that the Apache modules included in this package was compiled against Apache HTTP Server 2.0, and thus will not work with Apache HTTP Server 2.2.下載的過程中,沒注意這個東西!下次得多留意這些細節。

?????? 只好重新下載安裝apache_2.0.59版本,把Subversion/bin下面所有.dll文件復制到Apache Group\Apache2\bin下,提示有文件覆蓋,選擇不覆蓋;再將Subversion/bin下的.so文件復制到Apache Group\Apache2\modules下。

安裝Apache2.x時注意事項:

請確保你輸入正確的服務器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。重新運行安裝程序,這次應該不會再有問題了。


第二步,修改apache的配置文件
接著打開Apache HTTP Server 的 httpd.conf(在 /conf/ 目錄下),先找到以下兩行:
#LoadModule dav_module modules/mod_dav.so
#LoadModule dav_fs_module modules/mod_dav_fs.so
把這兩行最前面的 '#' 字符刪除,然后把下面這行加到這些 LoadModule 指令的后面:
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
用記事本打開 Apache HTTP Server 的 httpd.conf,在文件最后面加上以下幾行:
<Location /svn>
??? DAV svn
??? SVNParentPath d:/svn
</Location>
其中d:/svn為你要建的倉庫的父目錄(必須為本地目錄),最好用雙引號引一下.

第三步,創建倉庫
根據apache的配置文件的設置建立目錄:d:/svn.然后我們就可以在下面建立倉庫了,創建方法如下:
c:\>svnadmin create d:/svn/repository(svn大寫的時候居然驗證訪問被拒絕)
命令執行成功之后,會在d:/svn/repository下面生成很多的文件和目錄

第四步,使用
重新啟動Apache Server
在瀏覽器中輸入網址:
http://localhost/svn/repository/
這時候,看到頁面顯示:

Revision 0: /
Powered by Subversion version 1.3.2 (r19776).





安裝成功,接下來將進行進一步的設置。

二、配置

1.? 以兩種方式運行

(1) 以apache方式運行
? svn使用apache的權限管理對檔案庫及目錄進行讀寫管理。
??htpasswd的調用:
??? 1)用cmd進入到Apache的bin目錄下,直接開始調用
??? 2)把htpasswd添加到系統變量里.
??
? 建立保存用戶名和密碼的文件
? htpasswd -c? svn-auth-filename? username1
? 然后,會提示輸入密碼,這里就加入了一個用戶了。然后再加一個用戶:
? htpasswd -m ?/svn-auth-filename username2
?
? 建立控制用戶訪問權限的文件svn-access-filename
?[svn1:/]?????????????? //這表示,倉庫svn1的根目錄下的訪問權限
?harry = rw???????????? // svn1倉庫harry用戶具有讀和寫權限
?sally = r?????????????? // svn1倉庫sally用戶具有讀權限
?[svn2:/]?????????????? //svn2倉庫根目錄下的訪問權限
?harry = r?????????????? // harry用戶在svn2倉庫根目錄下只有讀權限
?sally =?????????????? // sally用戶在 svn2倉庫根目錄下無任何權限
?[svn2:/src]?????????? //svn2倉庫下src目錄的訪問權限
?harry=rw????????????
?sally=r
?[/]????????????????? // 這個表示在所有倉庫的根目錄下
?* = r?????????????? // 這個表示對所有的用戶都具有讀權限
?[groups]?????????????? // 這個表示群組設置
?svn1-developers = harry, sally?????????? // 這個表示某群組里的成員
?svn2-developers = sally
?[svn1:/]???????????
?@svn1-developers = rw?????? // 如果在前面加上@符號,則表示這是個群組權限設置
?
然后修改httpd.conf配置:
<Location /svn>
DAV svn
SVNParentPath /svn
AuthType Basic
AuthName "Subversion repository"(注意引號)
AuthUserFile? svn-auth-filename (保存用戶名和密碼)
Require valid-user
AuthzSVNAccessFile? svn-access-filename(保存用戶訪問的權限策略)
</Location>
(注:)
svn-access-filename,svn-auth-filename 文件直接可以放到C:\Program Files\Apache Group\Apache2\下,這也是默認的目錄,置于其他目錄下,啟動apache server出現錯錯誤。
AuthUserFile文件需要用htpasswd工具創建、維護;AuthzSVNAccessFile 文件可以用Subversion創建倉庫以后,生成的conf文件夾下面的authz文件加以修改。
如果已經有一個apache服務,希望兩個apache服務同時運行,則修改其中一個的服務端口。
修改httpd.conf中的一行: Listen 80 將80改成其他不用的端口號

啟動apahce就可以通過
http://svnmachine-ip/svn/svn1
http://svnmachine-ip/svn/svn2
這兩個URL來訪問倉庫了,當然,要受權限的限制,必須是合法用戶才能訪問且具有相應的權限

(2) svnserve方式運行
這種方式的運行又可以分為以下兩種(這和vsftp有些相似)
1) standalone mode
直接運行 #svnserve –d
運行 lsof -i :3690可以看到SVN服務器已經在運行

2) xinetd mode
在/etc/xinetd.d/下生成svnserve文件,內容如下
service svnserve
{
disable = no
socket_type = stream
protocol = tcp
wait = no
user = svnpub? (最好建一個這樣的用戶管理svn)
server = /usr/local/bin/svnserve
server_args = -i
}
編輯 /etc/services 檔,加入底下兩行:
svnserve 3690/tcp # Subversion svnserve
svnserve 3690/udp # Subversion svnserve
重啟xinetd服務,運行 netstat -a|grep svnserve 可以看到SVN服務器已經在運行

默認下客戶可以以匿名方式通過svn://方式任意訪問檔案庫,為了限制其權限,比如只允許讀操作,可以通過修改檔案庫conf子目錄中的svnseve.conf文件來實現。
#vi /svn1/conf/svnseve.conf
將下面三行前的#去掉
anon-access = none??????????? //則匿名用戶不可以通過svn://方式訪問檔案庫
auth-access = write????
password-db = passwd????????? //使用passwd中的用戶名和密碼進行認證,有一點不好的是這里面的密碼輸的是明文
authz-db = authz????????????? //使用authz中的權限控制策略,寫法如同apache中的svn-access-filename

如果想更強的安全性可以使用svn+ssh://訪問機制。
首當用戶通過svn+ssh://訪問時,服務器會自動啟動ssh認證機制,要求用戶輸入密碼,對于window用戶來說還需要安裝第三方軟件openssh,才可以采用這種機制。

2.? 將代碼導入項目倉庫。在要導入倉庫的目錄上面點擊右鍵,點擊TortoiseSVN項的子菜單Import…在URl里面填寫http://服務器IP/svn/project,這里project就是剛剛建立的項目倉庫,

在下面填入注釋,點擊OK,彈出提示輸入用戶名密碼對話框,填入flmn和password,就可以把代碼導入倉庫了。剛剛導入的文件并沒有顯示被svn管理,現在把這個目錄里文件都刪除,再在右鍵菜單里選擇SVN Checkout…就可以導出代碼,再看這個目錄,就有個小圖標在文件夾圖標下面了。

3.? 對于其它操作,和CVS差不多,這里就不贅述了。可以參考TortoiseSVN幫助文件。




放水老倌 2006-08-28 10:20 發表評論
]]>
[轉][譯]安裝基于Apache的Subversion服務器http://www.aygfsteel.com/zqli/archive/2006/08/26/65893.html放水老倌放水老倌Sat, 26 Aug 2006 01:36:00 GMThttp://www.aygfsteel.com/zqli/archive/2006/08/26/65893.htmlhttp://www.aygfsteel.com/zqli/comments/65893.htmlhttp://www.aygfsteel.com/zqli/archive/2006/08/26/65893.html#Feedback0http://www.aygfsteel.com/zqli/comments/commentRss/65893.htmlhttp://www.aygfsteel.com/zqli/services/trackbacks/65893.html [譯]安裝基于Apache的Subversion服務器

翻譯整理: PCplayer

時間:2006-08-06
版本:v0.1
關鍵詞:subversion 安裝 服務器 配置 apache
轉載請注意原文出處、版本、作者(譯者)
http://www.iusesvn.com/bbs/thread-158-1-1.html
--------------------------------------------------------------------------------

1. 引言
2. 安裝過程
2.1. 安裝Apache
2.2. 安裝Subversion
2.3. 配置


摘要

本文是TortoiseSVN1.3.5幫助中關于配置服務器一節的翻譯,根據行文需要做了一些調整與增減。英文原文參見TortoiseSVN1.3.5幫助的3.1. Apache Based Server。

要使用TortoiseSVN(或者其它的Subversion客戶端),你要有一個存放版本庫的地方。你可以將版本庫存放在本機,使用file://協議來訪問,也可以將它們放在一個服務器上,使用http://或svn://協議來訪問。兩種服務器協議(http://和svn://)也可以被加密成https://及svn+ssh://。下面將一步一步地為你展示如何在windows上配置這樣一個服務器。

如果你沒有服務器或者你只想單獨地工作,那么將版本庫存放在本機并使用file://協議來訪問是你最好的選擇,這樣的話,你可以略過本文。

1. 引言
在所有的Subversion服務器配置方式中,基于Apache的是最靈活的。雖然配置起來有一點點復雜,但是它提供了其它方式所沒有的好處:

WebDAV
基于Apache配置的Subversion服務器使用了被許多其它程序支持的WebDAV協議。舉個例子,你可以在Windows的資源管理器中將這樣的一個版本庫掛載成一個“Webfolder”,然后像文件系統中的其它文件夾一樣訪問它。

瀏覽版本庫
你可以在不安裝Subversion客戶端的情況下,使用瀏覽器來瀏覽版本庫中的內容。這將使得更大范圍的用戶可以訪問你的數據。

用戶驗證
你可以使用任何Apache支持的驗證機制,包括SSPI和LDAP。

安全
Apache是非常的穩定和安全,因此你的版本庫自然而然地擁有同樣的安全性。包括SSL加密。

2. 安裝過程
2.1. 安裝Apache
安裝Apache前,你要有一臺運行Windows2000、Windows XP + sp1或Windows2003的電腦。

警告:請注意,沒安裝Service Pack 1的Windows XP將導致錯誤的網絡數據從而破壞你的版本庫!

http://httpd.apache.org/download.cgi 下載最新版本的Apache Web服務器。確保你下載的版本大于2.0.54。2.0.54版本的Apache將不能與Subversion 1.3.xx配合工作。而且,小于2.0.54的Apache也因為在windows上的編譯存在一個bug而導致不能與subversion1.2配合使用。

一旦你已經有了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。然后重新運行這個安裝程序,這次應該不會再有問題了。

現在你可以在你的瀏覽器中鍵入 http://loccalhost,如果呈現了一個已經配置好的網站,那么你的Apache就安裝成功了。

警告

如果你將Apache安裝成一個服務,它將以本地system帳戶來運行。為Apache創建一個單獨的用戶來運行它將會更安全一些。

請確保運行Apache的用戶有版本庫的完全訪問權限(右鍵版本庫目錄->屬性->安全)。要不然,用戶將無法提交他們的更改。

就算Apache以本機system來運行,你也要設置它能完全讀寫版本庫目錄。

如果沒有為Apache配置這個許可,用戶將會得到"禁止訪問"的錯誤信息,在Apache的錯誤日志中表現為錯誤500。

2.2. 安裝Subversion
http://subversion.tigris.org/ser ... entList?folderID=91 (英文)

http://www.iusesvn.com/bbs/forumdisplay.php?fid=7(中文)下載最新版本的Subversion。

運行Subversion安裝程序,如果安裝程序能夠識別你已經安裝了Apache,那么你的安裝基本上就OK了。如果它不能,那么你要做一些額外的步驟。

使用資源管理器,進入Sibversion的安裝目錄(通常為c:\program files\Subversion),找到文件httpd/mod_dav_svn.so和mod_authz_svn.so,將它們拷貝到Apache的modules目錄(通常為c:\program files\apache group\apache2\modules)。

從Subversion的安裝目錄拷貝文件libdb43.dll到Apache的modules目錄。

使用如記事本之類的文本編輯器編輯Apache的配置文件(通常為c:\program files\apache group\apache2\conf\httd.conf),修改以下內容:

去掉以下行的注釋(將開頭的#刪除):

#LoadModule dav_fs_module modules/mod_dav_fs.so
#LoadModule dav_module modules/mod_dav.so
在LoadModule節的最后添加以下兩行:

LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
2.3. 配置
現在,你已經安裝了Apache和Subversion,但是Apache還不知道如果處理像TortoiseSVN一樣的Subversion客戶端。要讓Apache知道哪個URL將被Subversion使用,你要像下面這樣編輯Apache的配置文件(通常在c:\program files\apache group\apache2\conf\httpd.conf):

在配置文件的最后添加下面這些行:

<Location /svn>
SVNParentPath D:\SVN
AuthType Basic
AuthName "Subversion repositories"
AuthUserFile D:\passwd
#AuthzSVNAccessFile D:\svnaccessfile
Require valid-user
</Location>
這樣配置表示:你所有的版本庫將位于D:\SVN目錄下,要訪問你的版本庫可以使用這樣的URL:http://MyServer/svn/,訪問權限將由passwd文件中的用戶名/密碼來限制。

要創建passwd文件,可以打開命令行(DOS窗口),將當前目錄切換到apache2目錄(通常為c:\program files\apache group\apache2),然后打入以下命令以創建文件:

bin\htpasswd -c passwd <username>
重啟Apache服務。

將你的瀏覽器指向http://MyServer/svn/MyNewRepository(MyNewRepository是你之前創建的Subversion版本庫)。如果一切正常,你將被提示輸入用戶名密碼,輸入正確的用戶名密碼后你就可以看到版本庫中的內容了。

對你剛剛輸入的apache配置作一些簡短的說明:

<Location /svn>

意味著可以通過像這樣的URL(http://MyServer/svn)來訪問Subversion版本庫

DAV svn

告訴Apache哪個模塊負責服務像那樣的URL--在這里就是Subversion模塊

SVNListParentPath on

在Subversion 1.3及更高版本中,這個指示器使得Subversion列出由SVNParentPath指定的目錄下所有的版本庫

SVNParentPath D:\SVN

告訴Subversion在目錄D:\SVN下尋找版本庫

AuthType Basic

啟用基本的驗證,比如用戶名/密碼對

AuthName "Subversion repositories"

當一個驗證對話框彈出時,告訴用戶這個驗證是用來做什么的

AuthUserFile D:\passwd

指定D:\passwd用為密碼文件用來驗證用戶的用戶名及密碼

AuthzSVNAccessFile D:\svnaccessfile

指定D:\svnaccessfile來限定各個用戶或組在版本庫中目錄的訪問權限

Require valid-user

限定用戶只有輸入正確的用戶名及密碼后才能訪問這個路徑

----------------------------------------

上面的配置僅僅是一個簡單的示例。你還可以對Apache進行許許多多的配置。

1如果你想讓所有用戶對版本庫都有讀的權限而只有特定的用戶才有寫的權限,你可以將這行

Require valid-user
改為

<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
2上面的配置使用了passwd文件將你所有的版本庫作為一個單元來限定訪問權限。如果你想獲得更多的控制,如限定某個用戶可以訪問版本庫中的哪個目錄,可以把下面這行的#去掉:

#AuthzSVNAccessFile D:\svnaccessfile
然后創建一個Subversion授權文件。Apache將確保只有有效的用戶可以訪問你的/svn位置,然后將用戶名傳到AuthzSVNAccessFile模塊,這樣可以依據Subversion授權文件得到更精細的權限控制。注意,路徑將被指定為[庫:路徑]或者簡單的[路徑]。如果你不明確指定一個庫,訪問規則將應用到由SVNParentPath指定的目錄下所有的版本庫中。一個例子可能像這樣:

[groups]
admin = john, kate
devteam1 = john, rachel, sally
devteam2 = kate, peter, mark
docs = bob, jane, mike
training = zak

# 為所有庫指定默認訪問規則
# 所有人可以讀,管理員可以寫,危險分子沒有任何權限
[/]
* = r
@admin = rw
dangerman =

# 允許開發人員可以完全訪問他們的項目版本庫
[proj1:/]
@devteam1 = rw
[proj2:/]
@devteam2 = rw
[bigproj:/]
@devteam1 = rw
@devteam2 = rw
trevor = rw

# 文檔編寫人員對所有的docs目錄有寫權限
[/trunk/doc]
@docs = rw

# 培訓人員可以完全訪問培訓版本庫
[TrainingRepos:/]
@training = rw
以上介紹的配置為Apache多庫方式,即一個location可以同時為多個版本庫服務,
假設你的ip為192.168.0.1,在D:\SVN目錄下建了兩個版本庫,proj1和proj2
可以分別用下面兩個url來訪問你的版本庫

http://192.168.0.1/svn/proj1


http://192.168.0.1/svn/proj1
還有一種配置方式為Apache單庫方式,即一個location只能為一個版本庫服務,
配置時只要將上面的SVNParentPath改為SVNPath,同時將后面的路徑由版本庫的父目錄改為版本庫的目錄
如:

<Location /svn>
SVNPath D:\SVN\proj1
AuthType Basic
AuthName "Subversion repositories"
AuthUserFile D:\passwd
#AuthzSVNAccessFile D:\svnaccessfile
Require valid-user
</Location>
這時,可以用下面的URL來訪問版本庫proj1

http://192.168.0.1/svn


放水老倌 2006-08-26 09:36 發表評論
]]>
[轉]Subversion 的一些第三方工具 http://www.aygfsteel.com/zqli/archive/2006/08/24/65575.html放水老倌放水老倌Thu, 24 Aug 2006 09:09:00 GMThttp://www.aygfsteel.com/zqli/archive/2006/08/24/65575.htmlhttp://www.aygfsteel.com/zqli/comments/65575.htmlhttp://www.aygfsteel.com/zqli/archive/2006/08/24/65575.html#Feedback0http://www.aygfsteel.com/zqli/comments/commentRss/65575.htmlhttp://www.aygfsteel.com/zqli/services/trackbacks/65575.html 作者:未知 時間:2005-09-13 23:54 出處:Blog.ChinaUnix.net 責編:chinaitpower ??????????????摘要:Subversion 的一些第三方工具
? Subversion 的模塊化設計(在"分層化設計"一節中有描述)以及與其他語言的綁定的能力(在"使用 C 和 C++ 之外的語言"一節中有介紹)使得它很適合作為其他軟件的擴展或是支持模塊。在這個附錄中,我們將簡單的介紹一些使用 Subversion 的第三方的軟件。
??? 如果你想獲得這部分信息的最新的版本,請查閱 Subversion 站點的鏈接頁(http://subversion.tigris.org/project_links.html)。

D.1 客戶端和插件

??? AnkhSVN (http://ankhsvn.tigris.org/
??????? 微軟 Visual Studio .NET 的 Subversion 插件

??? JSVN (http://jsvn.alternatecomputing.com/
??????? Java Subversion 客戶端,包含一個 IDEA 的插件

??? psvn.el (http://xsteve.nit.at/prg/vc_svn/
??????? Emacs 的 Subversion 接口

??? RapidSVN (http://rapidsvn.tigris.org/
??????? 基于 WxPython libraries 的跨平臺的 Subversion 圖形化客戶端

??? Subclipse (http://subclipse.tigris.org/
??????? Eclipse 下的 Subversion 插件

??? Subway (http://nidaros.homedns.org/subway/
??????? Microsoft SCC provider for Subversion

??? sourcecross.org (http://www.sourcecross.org/
??????? Microsoft SCC provider for Subversion

??? Supervision (http://supervision.tigris.org/
??????? Subversion 的 Java/Swing 圖形化客戶端

??? Sven (http://www.nikwest.de/Software/#SvenOverview
??????? 使用 Mac OS X Cocoa 框架開發的 Subversion 圖形化客戶端

??? Svn4Eclipse (http://svn4eclipse.tigris.org/
??????? 為 Eclipse IDE 設計的 Subversion 插件

??? Svn-Up (http://svnup.tigris.org/
??????? 基于 Java 的 Subversion 以及 IDEA IDE 的插件
???
??? TortoiseSVN (http://tortoisesvn.tigris.org/
??????? 作為微軟 Windows 外殼擴展設計的 Subversion 客戶端
???
??? WorkBench (http://pysvn.tigris.org/
??????? 在 Subversion 基礎上構建的基于 Python 的跨平臺軟件設計環境

D.2 和語言的綁定

??? PySVN (http://pysvn.tigris.org/
??????? 供 Python 使用的面對對象的 Subversion 客戶端 API 項目

??? Subversion (http://subversion.tigris.org/
??????? 供 Python、Perl、和 Java 使用的 Subversion API;對應于核心的 C API

??? SVNCPP (http://rapidsvn.tigris.org/
??????? 供 C++ 的面對對象的 Subversion 客戶端 API

D.3 倉庫轉換工具

??? cvs2svn (http://cvs2svn.tigris.org/
??????? 從 CVS 到 Subversion 的轉換

??? vss2svn (http://vss2svn.tigris.org/
??????? 從 Microsoft SourceSafe 到 Subversion 的轉換
??
??? Subversion VCP Plugin (http://svn.clkao.org/revml/branches/svn-perl/
??????? 從 CVS 到 Subversion 轉換的 VCP 插件

D.4 更高領域的一些工具

??? Kwiki (http://www.kwiki.org/
??????? 帶有 Subversion 備份支持的 Wiki

??? Scmbug (http://freshmeat.net/projects/scmbug/
??????? 集成了漏洞跟蹤的軟件配置管理系統,支持 Subversion

??? Subissue (http://subissue.tigris.org/
??????? 直接在 Subversion 倉庫中跟蹤發布

??? Subwiki (http://subwiki.tigris.org/
??????? 使用 Subversion 作為數據倉庫 的 Wiki

??? svk (http://svk.elixus.org/
??????? 基于 Subversion 的分散式的 版本控制系統

??? submaster (http://www.rocklinux.org/submaster.html
??????? 基于 Subversion 的分布式的軟件開發系統

D.5 倉庫瀏覽工具

??? SVN::Web (http://svn.elixus.org/repos/member/clkao/
??????? 基于 Perl 的 Subversion 倉庫 Web 接口

??? ViewCVS (http://viewcvs.sourceforge.net/
??????? 基于 Python 的 CGI 腳本,用來瀏覽 CVS 和 Subversion 倉庫

??? WebSVN (http://websvn.tigris.org/
??????? 基于 PHP 的 Subversion 第三方倉庫瀏覽工具

??? Trac (http://projects.edgewall.com/trac
??????? 基于 Web 的軟件項目管理、漏洞跟蹤、發布系統,使用版本控制系統接口,并且集成了 Wiki 支持

(筆記:http://www.iusesvn.com/



放水老倌 2006-08-24 17:09 發表評論
]]>
主站蜘蛛池模板: 周宁县| 丰原市| 顺昌县| 兴宁市| 南丰县| 石首市| 淳安县| 丽江市| 西华县| 义马市| 八宿县| 安塞县| 富川| 探索| 岗巴县| 灵台县| 乌拉特前旗| 都匀市| 怀集县| 岑溪市| 新野县| 吴江市| 东城区| 浠水县| 通河县| 米林县| 三穗县| 平湖市| 巴中市| 宝坻区| 北碚区| 石河子市| 巫山县| 镇原县| 图们市| 丹江口市| 疏附县| 凤山市| 育儿| 合水县| 克拉玛依市|