svn服務器安裝

svn服務器安裝

首先初始化Repository,輸入命令:
 svnadmin create D:\TestRepository\
然後,把現有的項目的目錄結構以及文件導入到Repository中:
 svn import D:\Projects\Project1 file:///D:\TestRepository\Project1 -m “初始化“
  • 修改D:\svn_repository\conf文件夾下的三個配置文件
主要修改svnserve.conf和passwd
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 = none
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
 
passwd
[users]
user=passwd
wyf=wyf
 
authz
[groups]
cms=zwa, zjq,nl
admin=wyf
[/ComputerMuseum/branch]
@admin=rw
@cms=rw
[/ComputerMuseum/trunk]
@admin=rw
@cms=rw
[/ComputerMuseum/doc]
@admin=rw
@cms=rw
[/]
@admin=rw
@cms=rw

  •  啓動服務
     svnserve -d -r D:\TestRepository\
  • 客戶端Checkout
     svn checkout svn://主機名/Project1?? (即獲取Project1的項目)
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章