一、安装
下载
http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91
如:安装到 D:\deploy\Subversion
二、建立Repository
打开命令窗口, 键入 :
svnadmin create --fs-type fsfs G:\svnsrc\game
三、配置Repository
进入Repository目录,在本文中是 G:\svnsrc\game
,你会看到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
alpha=123456
svnserve.conf中的[general] 和 passwd 中的 [users] 行前有#,一定要去掉,不要有空格
四、启动subversion
打开命令窗口键入
svnserve -d -r G:\svnsrc
默认端口是3690,如果不幸这个端口被别的程序暂用,可以通过选项 --listen-port=绑定端口
url格式为 svn://ip地址//Repository 名,在本文中是svn://127.0.0.1/game
subversion安装成service
以前的svnserve要想成为windows服务,必须依赖于svnservice或其他工具。从Subversion1.4开始,Subversion本身就集成Windows服务的工具。
1,安装svnservice
在Windows NT中(包括Windows XP, Windows 2000, Windows 2003 Server)本身包含了一个安装服务的工具,叫做"Service Control",也就是sc.exe。
例如我的Subversion安装在"D:\Subversion",版本库在"G:\svnsrc",而我希望对应的Subversion服务名为svnservice,安装这个svn服务的命令就可以这样写:
sc create svnservice
binpath= "D:\Subversion\bin\svnserve.exe --service -r G:\svnsrc"
displayname= "SVNService"
depend= Tcpip
请注意,因为便于察看,上面的命令分为多行,但在实际执行时应该在一行里。另外,在以前启动svnserve时会使用"-d"选项,也就是守护进程模式,在这里不能使用,会导致服务无法启动。同样,"-i"和"-t"选项也不能使用。
在命令行窗口执行完这个命令之后,服务还没有启动,你可以继续运行"net start svnservice"启动这个服务,然后使用"net stop svnservice"停止服务。
另外还有两点需要小心处理。首先,如果路径中包括空格,一定要用“\”处理“"”号,例如上面的例子中如果svnserve.exe在“c:\program files\subversion\”中,则命令应该写为“binpath= "\"c:\program files\subversion\bin\svnserve.exe\"”(“”中的内容),整个命令如下,红色部分是改变部分:
sc create svnservice
binpath= "\"D:\program files\Subversion\bin\svnserve.exe\" --service -r G:\svnsrc"
displayname= "SVNService"
depend= Tcpip
其次,sc对选项的格式还有要求,例如“depend= Tcpip”不能写为“depend = Tcpip”或“depend=Tcpip”,也就是“=”前不能有空各,而后面必须有空格。
2,删除服务
如果服务安装的有问题,你可能需要删除服务。要删除前面添加的服务,只需要运行"sc delete svnservice","svnservice"就是我们创建服务时使用的名字。
3,配置服务是自动启动
默认情况下安装的服务不会随Windows的启动而启动,为了使svn服务能够随Windows启动而启动,需要修改一下"sc create"命令(首先要删除),增加"start= auto"选项:
sc create svnservice
binpath= "D:\Subversion\bin\svnserve.exe --service -r G:\svnsrc"
displayname= "SVNService"
depend= Tcpip
start= auto
当然你也可以使用图形化的工具修改服务的属性,你可以在“开始->运行...”中执行"services.msc",然后在界面中修改。
链接:
关于sc安装svn服务的详细信息,可以看看这篇文章:
http://svn.collab.net/repos/svn/tags/1.4.0/notes/windows-service.txt
分享到:
相关推荐
Windows下架设Subversion服务器,可以跟好的管理源代码,是团队开发不可缺少的东西。
Windows下架设subversion服务器.txt
本文件详细介绍了Subversion服务器的安装和配置流程
Subversion服务器程序,版本控制器 服务端
Subversion-1.6.5 svn的windows服务器端
Windows下Subversion服务器搭建指南
Subversion 服务器(32)
windows2003下架设svn服务器 1、获取 Subversion 服务器程序 到官方网站(http://subversion.tigris.org/)下载最新的服务器安装程序。目前最新的是1.5版本,具体下载地址在:...
subVersion_64位服务器软件,符合软件开发过程中版本控制的用户。在基本的Intranet的条件下或Internet的条件下使用。
Windows下Subversion安装使用 Windows下Subversion安装使用
SVN配置管理 subversion服务器端和客户端操作
Windows安装配置SubVersion
Ubuntu中安装subversion服务器,Ubuntu中安装subversion配置服务器,超级详细!
详细介绍Ubuntu下搭建 Subversion 服务器过程,以及svn的使用、常用命令、用户权限、清理和删除等,对初级开发者会有一定帮助
linux系统安装subversion服务器与配置实用.pdf
Windows上的服务器端安装(Subversion)
windows环境下的subversion
博文链接:https://tvjody.iteye.com/blog/216108
Windows下安装Apache subversion 域认证
WINDOWS下安装SUBVERSION服务端和TORTOISESVN客户端详细教程