<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Sealyu

    --- 博客已遷移至: http://www.sealyu.com/blog

      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
      618 隨筆 :: 87 文章 :: 225 評論 :: 0 Trackbacks
    作者:sealyu
    1. 簡介
    SubVersion 是新一代的版本控制工具,不僅可以管理程序源代碼,而且也可用于文檔或其他相關資料的管理。
    2. 下載
    svnsetup.exe   http://subversion.tigris.org
    客戶端TortoiseSVN http://tortoisesvn.net/downloads
    3. 安裝步驟
      1)安裝剛才下載的軟件
      下面假設svnsetup的安裝目錄為
     C:\Program Files\Subversion
     您想建svn庫的文件夾為 E:\svn
      
      2)創建庫
      在E:\svn下,右鍵-》TortoiseSVN->Create Repository here.
    會在此文件夾下創建一個版本庫,生成所需的文件。
      3)創建為Windows自動運行的服務
      Subversion 從1.4版本開始,可以以windows系統服務的形式在開機時自動運行。但Subversion安裝程序還不能把自己安裝成windows服務,需要我們自己進行手動安裝,方法如下: 打開一個DOS命令窗口,執行如下命令:  
    sc create svnserve binPath= "\"C:\Program Files\Subversion\bin\svnserve.exe\" --service --root E:\svn" displayname= "Subversion Repository" depend= Tcpip start= auto   
    其中,sc是windows自帶的服務配置程序,參數binPath表示svnserve可執行文件的安裝路徑,由于路徑中的"Program Files"帶有空格,因此整個路徑需要用雙引號引起來。而雙引號本身是個特殊字符,需要進行轉移,因此在路徑前后的兩個雙引號都需要寫成\"
    -- service參數表示以windows服務的形式運行,--root指明svn repository的位置,service參數與root參數都作為binPath的一部分,因此與svnserve.exe的路徑一起被包含在一對雙引號當中,而這對雙引號不需要進行轉義。
    displayname表示在windows服務列表中顯示的名字, depend =Tcpip 表示svnserve服務的運行需要tcpip服務,start=auto表示開機后自動運行。  
    安裝服務后,svnserve要等下次開機時才會自動運行。  
    若要卸載svn服務,則執行 sc delete svnserve 即可。  
    4)配置訪問權限
     1 配置倉庫
    SVN的svnserve對于每個倉庫,有一個獨立的配置文件和獨立的用戶、權限管理。
    在這里仍然要保持配置文件svnserve.conf的獨立,但是用戶、權限管理是用統一的一個文件來存儲。
    這樣方便以后的管理和維護。
    另外要注意,即使svnserve服務已經運行,修改配置文件或者用戶、權限管理文件,保存后馬上生效,不需要重啟服務。
    假設已經配置兩個倉庫: source1和source2,都在E:\svn下.
    我們在E:\svn下放兩個文件:passwd.conf 和authz.conf
    1.1 配置source1倉庫
    進入倉庫目錄
    1.2 修改配置
    你可以直接刪除默認的svnserve.conf文件,然后使用下面的配置:
    編輯svnserve.conf
    [general]
    anon-access = none
    auth-access = write
    password-db = ..\..\passwd
    authz-db = ..\..\authz
    realm = My First Repository
    說明:
    anon-access = none #不允許匿名用戶訪問
    auth-access = write #通過驗證的用戶可以讀和寫
    password-db = ..\..\passwd#用戶保存文件
    authz-db = ..\..\authz#權限管理文件
    realm = My First Repository #倉庫名稱
    1.3 配置source2倉庫
    進入倉庫目錄
    1.4 修改配置
    你可以直接刪除默認的svnserve.conf文件,然后使用下面的配置:
    編輯svnserve.conf
    [general]
    anon-access = none
    auth-access = write
    password-db = ..\..\passwd
    authz-db = ..\..\authz
    realm = My Second Repository
    如果有更多的倉庫,可以類推配置。
    ----------------------------------------------------------------------
    svnserve.conf的原始內容:
    ### This file controls the configuration of the svnserve daemon, if you
    ### use it to allow access to this repository. (If you only allow
    ### access through http: and/or file: URLs, then this file is
    ### irrelevant.)
    ### Visit http://subversion.tigris.org/ for more information.
    [general]
    ### These options control access to the repository for unauthenticated
    ### and authenticated users. Valid values are "write", "read",
    ### and "none". The sample settings below are the defaults.
    # anon-access = read
    # auth-access = write
    ### The password-db option controls the location of the password
    ### database file. Unless you specify a path starting with a /,
    ### the file's location is relative to the conf directory.
    ### Uncomment the line below to use the default password file.
    # password-db = passwd
    ### The authz-db option controls the location of the authorization
    ### rules for path-based access control. Unless you specify a path
    ### starting with a /, the file's location is relative to the conf
    ### directory. If you don't specify an authz-db, no path-based access
    ### control is done.
    ### Uncomment the line below to use the default authorization file.
    # authz-db = authz
    ### This option specifies the authentication realm of the repository.
    ### If two repositories have the same authentication realm, they should
    ### have the same password database, and vice versa. The default realm
    ### is repository's uuid.
    # realm = My First Repository
    ----------------------------------------------------------------------
    2 用戶管理
    2.1 創建用戶存儲文件
    編輯passwd
    2.2 設置用戶帳號
    [users]
    harry = harryssecret
    sally = sallyssecret
    bote = botessecret
    說明:
    [users] #是必須的,標記為用戶配置開始
    harry = harryssecret # harry 是用戶名 , harryssecret是密碼。注意,是明文密碼
    sally = sallyssecret # 同上
    bote = botessecret # 同上
    往后所以倉庫的用戶都在這里記錄就可以了。至于那個用戶,允許訪問那個倉庫,在權限管理里限制。
    3 權限管理
    3. 1 創建權限管理文件
    編輯authz.conf
    3.2 設置權限管理
    [groups]
    source1 = harry
    source2 = sally
    [source1:/]
    @source1 = rw
    @source2 = r

    [source2:/]
    @source2 = rw
    bote = rw

    posted on 2008-04-24 16:35 seal 閱讀(2209) 評論(3)  編輯  收藏 所屬分類: 版本控制

    評論

    # re: SubVersion(SVN) 安裝說明 2008-04-25 12:04 如坐春風
    mark  回復  更多評論
      

    # re: SubVersion(SVN) 安裝說明 2008-04-26 18:55 x.matthew
    有沒有服務配置和使用這方面的說明文檔,能共享一下嗎?  回復  更多評論
      

    # re: SubVersion(SVN) 安裝說明 2008-04-26 22:22 sealyu
    文檔有的,不過建議你看官方文檔。其他的也有一些,如果需要,可以聯系我:sealyu@hotmail.com. 共同進步!
      回復  更多評論
      

    主站蜘蛛池模板: 亚洲酒色1314狠狠做| 亚洲精品国产首次亮相| 84pao国产成视频免费播放| 91亚洲精品第一综合不卡播放| 免费人成网站在线观看10分钟| 久久水蜜桃亚洲AV无码精品| 亚洲国产人成中文幕一级二级| 久久久久国产精品免费免费不卡| 亚洲人成网国产最新在线| 亚洲国产日韩成人综合天堂| 99国产精品视频免费观看| 苍井空亚洲精品AA片在线播放 | 亚洲免费在线视频播放| 日本一区二区三区日本免费| 中国极品美軳免费观看| 亚洲中文字幕一二三四区苍井空| 亚洲日本在线观看视频| 青娱乐免费在线视频| 国产成人无码免费看片软件| 亚洲精品国产精品国自产网站| 久久精品国产精品亚洲| 最近中文字幕无吗免费高清| 两个人看的www免费视频| 亚洲精品无码你懂的| 亚洲2022国产成人精品无码区| 久久精品国产精品亚洲色婷婷| 成年女人18级毛片毛片免费| 国内永久免费crm系统z在线 | 最近2019中文字幕免费大全5| 国产亚洲综合一区二区三区| 亚洲国产情侣一区二区三区| 亚洲无人区一区二区三区| 四虎影院免费在线播放| 最近中文字幕大全中文字幕免费 | h片在线播放免费高清| 亚洲天堂2017无码中文| 久久久综合亚洲色一区二区三区| 亚洲AV日韩精品一区二区三区 | 免费一级毛片不卡不收费| 无码人妻一区二区三区免费手机| 可以免费观看的国产视频|