为什么选择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]
###Theseoptionscontrolaccesstotherepositoryforunauthenticated
###andauthenticatedusers.Validvaluesare"write","read",
###and"none".Thesamplesettingsbelowarethedefaults.
anon-access=read
auth-access=write
###Thepassword-dboptioncontrolsthelocationofthepassword
###databasefile.Unlessyouspecifyapathstartingwitha/,
###thefile'slocationisrelativetotheconfdirectory.
###Uncommentthelinebelowtousethedefaultpasswordfile.
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愉快
本文详细介绍如何搭建Subversion服务器,包括安装Subversion、创建Repository、配置访问权限及启动服务器等步骤,并提供客户端连接示例。
90

被折叠的 条评论
为什么被折叠?



