一、下載安裝
http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91
預設安裝即可。
二、建立Repository
1. 建立目錄,例如:c:\svnsrc\csharp
2. 開啟命令視窗, 鍵入 :svnadmin create --fs-type fsfs c:\svnsrc\csharp
三、配置Repository
進入Repository目錄,在本文中是 c:\svnsrc\csharp ,你會看到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 = read
auth-access = write
### The password-db option controls the location of the password-db = passwd
### 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### This file is an example password file for svnserve.
### Its format is similar to that of svnserve.conf. As shown in the
### example below it contains one section labelled [users].
### The name and password for each user follow, one account per line.
[users]
# harry = harryssecret
# sally = sallyssecret
user = password
四、啟動subversion
開啟命令視窗鍵入:svnserve -d -r c:\svnsrc
預設連接埠是3690,如果不幸這個連接埠被別的程式暫用,可以通過選項 svnserve -d --listen-port 連接埠號碼
url格式為:svn://ip地址//Repository名,在本文中是svn://127.0.0.1/csharp
五、將Subversion安裝成windows service
sc create svnservice binpath= "\"C:\Program Files\Subversion\bin\svnserve.exe\" --service -r c:\svnsrc" displayname= SVNService depend= Tcpip start= auto
總結:這樣,完成了在windows下架設subversion服務