一、软件
1、svn-1.4.0-setup.exe
2、TortoiseSVN-1.4.3.8645-win32-svn-1.4.3.msi
3、SVNService.exe
4、LanguagePack-1.4.3.8645-win32-zh_CN.exe
二、安装
首先,安装1、svn-1.4.0-setup.exe 和 2、TortoiseSVN-1.4.3.8645-win32-svn-1.4.3.msi,重启电脑;
其次,将 SVNService.exe 拷贝到 svnserve.exe 所在目录下,如 C:/Program Files/Subversion/bin 中;
三、注册Subversion服务
方法一
1. 如果SVN服务器安装在D:/Subversion,版本库在F:/svndata,为了使SVN服务能够随Windows启动而启动,需要键入以下命令
1
|
sc create svnservice binPath=
"/"D:/Program Files/Subversion/bin/svnserve.exe/" --service -r F:/svndata"
displayname=
"SVNService"
depend= Tcpip start= auto
|
其次,sc对选项的格式还有要求,例如“depend= Tcpip”不能写为“depend = Tcpip”或“depend=Tcpip”,也就是“=”前不能有空各,而后面必须有空格。
2. 在命令行窗口执行完以上这个命令之后,可以在服务器管理器 -> 配置 -> 高级安全Windows防火墙 -> 服务 下查看svnservice是否已启动。
若服务还没有启动,可以在命令行窗口运行
net start svnservice 启动这个服务
net stop svnservice 停止这个服务
3. 删除服务
sc delete svnservice
方法二
命令行窗口输入命令
svnserve –d –r D:/VersionLib/MyProject
这样就以守护的方式启动了Subversion服务器了,注意不要关闭命令行窗口,关闭窗口也会把Subversion服务停止掉
四、启动Subversion
在TortoiseSVN客户端输入url地址svn://IP地址/版本库名,本文中为svn://localhost/svnobject
五、防火墙开饭端口
六、项目库 conf 简单配置
1、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
chenyong = asset
admin = asset
2、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
更多内容可以借鉴:http://blog.im82.com/?p=362