SVN的安装和配置(Windows)

什么是SVN就不介绍了,网上的文章多的是,基本上是CVS的增强版。这里主要介绍一下SVN的安装和配置

1.下载和安装

· 下载SVN服务器端

http://subclipse.tigris.org/上下载SVN服务器端,我下载的是svn-win32- 1.4.5 .zip,直接解压缩后就可以用了(把 */svn-win32-1.4.5/bin目录添加到系统环境变量的path中,方便以后的使用)

       · 下载SVN for Eclipse 插件

       一般都推荐通过Eclipse自己的software update来安装。help -> software updates -> find and install -> Search for new features to install -> new remote site -> UR输入http://subclipse.tigris.org/update(但是由于更新,所以这个update地址也是会变的,如果按这个地址更新,将得到subclipse 1.0.0 版,为了更新到1.2.4 for Eclipse3.2+,使用http://subclipse.tigris.org/update_1.2.x这个更新地址,因此最好更新前去网站上看看最新版的更新地址是什么再实施更新,如果已经安装subclipse,在任何更新前,最好卸载以前版本的subclipse),然后按提示操作Eclipse就自动把SVN插件安装好了。

       如果想要下载后在本地安装,则依然在http://subclipse.tigris.org/上下载,当前版本是 1.2.4 ,下载地址是http://subclipse.tigris.org/servlets/ProjectDocumentList?folderID=2240,本地的安装方法参考其网站上的一篇说明,如下:

To install Subclipse from a Local Update Site:

1)  Download the update site archive and unpack it to a local folder.  You should

    have a structure like this:

 

    <parent folder>

         |-- update

               |-- features

               |-- plugins

               |-- web

               site.xml

 

2)  Start Eclipse 3.0 and choose Help -> Software Updates -> Find and Install

3)  Select "Search for new features to install" and click Next.

4)  Click "New Local Site"

5)  Navigate to and select <parent folder>/update and click OK

6)  You should now see that site in your list of sites.  Select it and click Next.

7)  Just follow the wizard to complete the install

 

2.创建代码仓库并打开服务(首先按第1步要求把 */svn-win32- 1.4.5 /bin目录添加到系统环境变量的path中)

· 在任意分区下建立仓库的上级目录,如G:/SVN(其实也可以把仓库放在根目录G:/下,但为了方便管理,尤其是有多个仓库时,所以还是建立一个上级目录比较好)

· 打开Windowscommand(开始 -> 运行 -> cmd),输入:

       svnadmin create G:/SVN/repository

· 此时,我们的代码仓库已经建立好了,下面以后台服务模式打开SVN服务

       svnserve -d -r g:/svn

       -d 表示以daemon后台服务打开svn服务

       -r 指定代码仓库的位置,这里有一点需要注意!-r后面指向的一定是代码仓库的上级目录

3.在客户端访问服务器,并指定代码仓库的位置

服务打开后,需要为subclipse(客户端)定位代码仓库的位置

       ·打开Eclipe

       ·Window -> open perspective -> other -> SVN resource explorer

       ·在SVN资源库中点击右键,选择新建->资源库位置

       ·URL输入svn://localhost/repository,确定就可以了。

 

结语:需要注意的有三点

1.以网络update方法更新的话,一定要关注网站上最新版本的更新地址

2.一定要在打开服务时,通过-r参数指定代码仓库的位置,否则Eclipse中的subclipse指定资源库位置时会出错。

3.打开服务,并指定代码仓库位置时,一定是指定仓库的上级目录,而不是仓库本身。这里是G:/SVN

 

 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值