step1)下载和安装服务器
下载并安装svn-1.2.3-setup.exe,假设你安装到D:\deploy\Subversion
step2)建立Repository
打开命令窗口, 键入 svnadmin create D:\deploy\projects\searchz
step3)配置Repository
进入Repository目录,在本文中是D:\deploy\projects\searchz,你会看到conf目录,进入该目录,你会看到svnserve.conf和passwd两个文件
对两个文件作如下修改
svnserve.conf 配置文件说明
[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
用户文件配置说明
passwd
[users]
# harry = harryssecret
# sally = sallyssecret
weip=weip
authz权限文件修改说明
[groups]
all = test, root (组=用户)
[/]
* = r (提示无权限的时候加入)
[searchz:/] (设置仓库文件访问权限说明)
root = rw
test = rw
我不再对上面两个文件具体内容作出解释,我相信各位一看就懂,我需要提醒的就是 一开始svnserve.conf中的[general] 和 passwd 中的 [users] 行前有#,一定要去掉,否则会抛错
step4)启动subversion服务器
打开命令窗口键入svnserve -d -r D:\deploy\projects,默认端口是3690,如果不幸这个端口被别的程序暂用,可以通过选项 --listen-port=绑定端口