9歩完成SVN(subversion)服務端的安裝配置

lonthy發表於2013-08-29

1.安裝完成subversion

2.在E盤建立一個資料夾svnroot,在此資料夾內部建立SVN的一個資料夾

3.執行cmd,cd開啟subversion安裝目錄的bin

4.輸入命令svnadmin create E:\svnroot\SVN,開啟SVN,你會發現多一些檔案,或者是在SVN資料夾中右擊滑鼠,找到Tortoist SVN的create repository,點選

5.開啟SVN資料夾下的config,

修改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 directory containing
### this configuration file.
### If SASL is enabled (see below), this file will NOT be used.
### 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 the
### directory containing this file.  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

[sasl]
### This option specifies whether you want to use the Cyrus SASL
### library for authentication. Default is false.
### This section will be ignored if svnserve is not built with Cyrus
### SASL support; to check, run 'svnserve --version' and look for a line
### reading 'Cyrus SASL authentication is available.'
# use-sasl = true
### These options specify the desired strength of the security layer
### that you want SASL to provide. 0 means no encryption, 1 means
### integrity-checking only, values larger than 1 are correlated
### to the effective key length for encryption (e.g. 128 means 128-bit
### encryption). The values below are the defaults.
# min-encryption = 0
# max-encryption = 256

在passwd檔案中下部新增USER:

Xigua = xigua

Pingguo=pingguo

至於authr,是設定哪個哪個的許可權(read、write),通過分組的方式,要用此檔案則svnserve.conf中的那行也要取消註釋(具體你可以查一下別人怎麼分,不分的話就是所有的USER都有RW的許可權)。

6.還是那個cmd,輸入命令svnserve.exe -d -r E:\svnroot(這-d-r什麼意思呢,自己輸入svnserve.exe -h就知道了,至於輸入地址是以此地址為根目錄),這樣subversion服務端就跑起來了。

7.隨便什麼目錄下,右鍵SVN checkout,URL為svn://localhost/SVN,下面是repository目錄地址,這要是發生錯誤,是因為你的地址有誤,相信你會修改的。

8.右鍵Tortoist SVN,點選Repo-browser,瀏覽,輸入你設定的使用者及密碼你就可以CRUD了。

9.至於匯入匯出,自己摸索一下,很簡單,總不會什麼都要說明白吧。

相關文章