在 Windows XP上安装 SVN Subversion 服务端
2011-06-30 11:23
204 查看
在 Windows XP上安装 SVN Subversion 服务端
折腾了我一下午加一晚上,终于配置好了。与大家分享下我的经历。
Subversion的主页是http://subversion.tigris.org/ 或者你也可以直接点击这里下载
Setup-Subversion-1.6.5.msi
TortoiseSVN 的主页是 http://tortoisesvn.tigris.org/ 你也可以直接点击这里下载TortoiseSVN-1.6.5.16974-win32-svn-1.6.5.msi
首先我们安装运行Setup-Subversion-1.6.5.msi 安装界面比较简单,我们主要关注安装位置,假定我们安装在默认位置C:/Program Files/Subversion
接下来安装TortoiseSVN-1.6.5.16974-win32-svn-1.6.5.msi,默认即可。
sc create svnservice binpath= "/"C:/Program
Files/Subversion/bin/svnserve.exe/" --service " displayname=
"SVNService" depend= tcpip start= auto
这里要特别注意一下sc命令的使用。主要是注意一下=号后面的空格和svn路径的空格。
若svnserve.exe的路径中有空格,则必须在路径前后加入”的转义符/”。
用此方式启动的服务,访问方式与Daemon方式相同,地址:svn://59.64.xxx.xxx/svn/fcrepos。
添加该服务之后,每次系统启动后会自动启动svnserve。
但当前因为还没有重启电脑,所以需要手动启动:
net start svnservice
若要停止:
net stop svnservice
若要删除服务
sc delete svnservice
要删除前面添加的服务,只需要运行"sc delete svn","svn"就是我们创建服务时使用的名字。
要查看添加的服务,运行services.msc即可。
折腾了我一下午加一晚上,终于配置好了。与大家分享下我的经历。
1安装
服务端软件 | Setup-Subversion-1.6.5.msi | Windows MSI installer with the basic win32 binaries – includes binaries for Apache 2.2.x (2.2.9 or higher is required within the 2.2.x series) |
客户端软件 | TortoiseSVN-1.6.5.16974-win32-svn-1.6.5.msi | 常用的GUI客户端 |
Setup-Subversion-1.6.5.msi
TortoiseSVN 的主页是 http://tortoisesvn.tigris.org/ 你也可以直接点击这里下载TortoiseSVN-1.6.5.16974-win32-svn-1.6.5.msi
首先我们安装运行Setup-Subversion-1.6.5.msi 安装界面比较简单,我们主要关注安装位置,假定我们安装在默认位置C:/Program Files/Subversion
接下来安装TortoiseSVN-1.6.5.16974-win32-svn-1.6.5.msi,默认即可。
2建立svn服务器
2.1.首先通过图形界面在C盘建立一个名为svn目录
2.2.在cmd运行svnadmin create C:/svn/fcrepos
2.3.则此时在svn目录下会出现fcrepos目录,修改conf文件夹里面的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 = none //改为=none,去掉# 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 directory containing ### this configuration file. ### If SASL is enabled (see below), this file will NOT be used. ### 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 the ### directory containing this file. 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 |
2.4.修改passwd,创建用户名和密码
修改好svnserve.conf后,我们再修改 passwd文件。加入我们需要的用户名fc和口令123。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 fc = 123 //添加用户名和密码 |
3.启动svnserve,以及客户端的访问
我们介绍两种,一种是以daemon方式调用,一种是以Windows Service的方式调用。3.1.Daemon方式
在cmd里运行svnserve --daemon,则启动svn服务器,此时在客户端通过svncheckout即可访问,地址:svn://59.64.xxx.xxx/svn/fcrepos,(注意是svn开头不是http开头,http开头的用于基于apache的svn)但这种方式必须cmd窗口必须一直打开,一旦关闭,则svnserve停止。因此可以考虑采用windows service的方法,即开机自动启动。3.2.Windows Service的方式
在系统内添加自动启动的服务项:sc create svnservice binpath= "/"C:/Program
Files/Subversion/bin/svnserve.exe/" --service " displayname=
"SVNService" depend= tcpip start= auto
这里要特别注意一下sc命令的使用。主要是注意一下=号后面的空格和svn路径的空格。
若svnserve.exe的路径中有空格,则必须在路径前后加入”的转义符/”。
用此方式启动的服务,访问方式与Daemon方式相同,地址:svn://59.64.xxx.xxx/svn/fcrepos。
添加该服务之后,每次系统启动后会自动启动svnserve。
但当前因为还没有重启电脑,所以需要手动启动:
net start svnservice
若要停止:
net stop svnservice
若要删除服务
sc delete svnservice
要删除前面添加的服务,只需要运行"sc delete svn","svn"就是我们创建服务时使用的名字。
4备注
若要让一个文件夹脱离SVN控制,删除该目录下的“.svn”文件夹即可。要查看添加的服务,运行services.msc即可。
相关文章推荐
- 在 Windows 上安装 SVN Subversion 服务端
- 安装SVN服务端(Subversion)解决的问题(如:url 'svn://192.168.1.123/src/' doesn't exist)
- 在 Windows 上安装 SVN Subversion 服务端
- 在 Windows 上安装 SVN Subversion 服务端
- SVN服务端 Subversion安装与配置 注意的细节问题
- Windows下SVN服务端(Subversion)及客户端(TortoiseSVN)详细安装教程
- linux安装subversion/svn服务端
- 9歩完成SVN(subversion)服务端的安装配置
- 项目管理---SVN,Subversion的安装,客户端和服务端
- Ubuntu15安装Subversion(SVN)服务端
- SVN的服务端Subversion的安装和客户端的使用----基础入门教程
- 在 Windows 上安装 SVN Subversion 服务端
- 在 Windows 上安装 SVN Subversion 服务端
- Windows Server 2008 安装与配置Subversion(SVN)服务器
- windows安装svn服务端
- SVN服务端安装
- Asianux Server 3 安装Apache + svn(subversion)
- subversion(svn)服务器安装配置(apache与svn集成安装配置)
- svn版本管理系统的安装 centos+subversion+apache+jsvnadmin