pwlazy的专栏

来源:百度文库 编辑:神马文学网 时间:2024/04/29 19:14:02
windows下架设subversion服务器
为什么选择subversion不在本文讨论范围,网上到处都是,本文仅描述架设subversion服务器的步骤:
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
我不再对上面两个文件具体内容作出解释,我相信各位一看就懂,我需要提醒的就是 一开始svnserve.conf中的[general] 和 passwd 中的 [users]  行前有#,一定要去掉,否则会抛错
step4)启动subversion服务器
打开命令窗口键入svnserve -d -r D:\deploy\projects,默认端口是3690,如果不幸这个端口被别的程序暂用,可以通过选项 --listen-port=绑定端口
后记:
这样服务器就架设好了。当然你可以使用apache和subversion结合使用,本文使用了subversion自带的svn服务器
url格式为svn://ip地址//Repository名,在本文中是svn://127.0.0.1/searchz
你可以下载客户端TortoiseSVN访问svn服务器,如果你使用eclipse作开发的话,也可以装个subclipse插件充当客户端。当客户端连上服务器之后,然后在建立远程文件夹(作为一个项目目录),然后将远程文件check out到本地之后,你在该目录下所产生的任何文件就都处于svn的控制了,以下你就可以版本控制的操作了,祝各位svn愉快