`
hupy
  • 浏览: 188765 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Windows下安装subversion

阅读更多

前几天装SubVersion,在google上搜了一把,按国内的帖子的步骤,总报SVN_EDITOR找不到的错,无奈只好放下了。今天硬着头皮看了下老外写的安装指南,一下搞定,原来前几天搜的帖子少了增加SVN_EDITOR为环境变量的步骤。今天把老外的帖子转到这来。

  1. Download everything
    1. Go to http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91 and download the most recent svn-x.y.z-setup.exe. At the time of this writing, the latest version was svn-1.4.4-setup.exe. 我安装的时候只用了1.4.4下面的软件都没装。
    2. Go to http://dark.clansoft.dk/~mbn/svnservice/ and download SVNService.zip.
    3. Go to http://tortoisesvn.tigris.org/download.html and download the most recent installer. At the time of this writing, the latest version was TortoiseSVN-1.1.7-UNICODE_svn-1.1.4.msi. (It doesn't have to be the exact same version as the svn installer you got in step 1. See the compatibility chart.)
  2. Install the server and the command-line client
    1. Run svn-x.y.z-setup.exe and let it install stuff.  运行svn安装文件exe
    2. Go to Control Panel > System, go to the Advanced tab, and click the "Environment Variables" button at the bottom. Click the "New" button (either one, but if you're undecided, use the one under "System variables"), set "variable name" to SVN_EDITOR, and "variable value" to the path and filename of a text editor of your choice (e.g., C:\Windows\Notepad.exe). OK all the way out.  编辑系统环境变量,添加SVN_EDITOR = C:\Windows\Notepad.exe。
  3. Create a repository and configure access
    1. Create a new directory somewhere out of the way; this is where your repository will live, but you'll almost never actually open the files directly. I made a directory called svn_repos directly under my C:\Documents and Settings, just so it'd be out of the way.  创建存放svn的根目录
    2. Open a command prompt and type: svnadmin create "C:\Documents and Settings\svn_repos"  打开cmd窗口,输入 svnadmin create "F:\SVN";
    3. In Windows Explorer, browse to the C:\Documents and Settings\svn_repos\conf directory (which svnadmin just created for you), and edit a couple of config files:  打开刚才指定的目录 
      1. Open the svnserve.conf file in a text editor, and uncomment the [general], anon-access = read, auth-access = write, and password-db = passwd lines. Save.  编辑svnserv.conf文件,然后将anon-access = read, auth-access = write, and password-db = passwd  前面的注释去掉
      2. Open the passwd file in a text editor, uncomment the [users] line, and add the username and password you want to use when connecting to your subversion server. Save.  然后打开passwd文件,添加一个用户名、密码键值对
  4. Start the server manually, and create a project 手动启动服务,并创建一个项目
    1. In your command window, type: svnserve --daemon --root "C:\Documents and Settings\svn_repos" 在一个cmd窗口中输入以上指令
    2. Open a second command window, and type svn mkdir svn://localhost/monkey 再打开一个cmd窗口,然后输入svn mkdir svn://localhost/*** 
    3. You'll see the text editor you specified in step II.2, with some text already in it. Type a comment, like "Created the monkey project", at the beginning of the file (before the line starting with "--"). Save the file and close the editor. 这时候将出现一个文本文件,在第一行随便输入一些信息然后点击保存并关闭
    4. If your Subversion login is the same as your Windows login, then type your password (the one you put in the passwd file) at the prompt, and hit Enter. If your Subversion login is different from your Windows login, then just hit ENTER at the password prompt, and Subversion will then ask for both your login and your password. 如果你的subversion跟你的windows登陆方式一样,则输入密码,否则 直接enter,然后按照提示输入前面设置的用户名和密码
    5. Subversion should tell you that it "Committed revision 1." Congratulations! You just checked a change into Subversion. Throw yourself a party. (Yes, creating a directory is a revisioned change — you can go back and get the repository as of a time before that directory existed. This is novel stuff for folks like me who still use VSS at work.) 这个时候subversion将提示你第一个版本创建成功
    6. It's conventional to have /trunk, /branches, and /tags subdirectories for each project (your code goes into trunk, and the others are where you put, well, branches and tags). Go ahead and type svn mkdir svn://localhost/monkey/trunk (and notice that, after you enter a checkin comment, it doesn't prompt you for your password again — it's smart like that). 当然可以通过同样的方式创建trunk、branches等
  5. Start the server for real 启动服务器 
    1. Go back to the command window that's running svnserve. Hit Ctrl+C to stop it.返回刚才启动服务的cmd窗口,使用ctrl + C退出
    2. Open the SVNService.zip that you downloaded earlier. Extract SVNService.exe into your Subversion bin directory (Program Files\Subversion\bin). Yes, it's important that you put it in this directory; it has to be in the same place as svnserve.exe from the Subversion distribution.  打开SVNService.zip,解压里面的exe到安装subversion的bin下。
    3. In a command prompt, type svnservice -install --daemon --root "C:\Documents and Settings\svn_repos" 然后再cmd窗口下输入 svnservice -install --daemon --root “”
    4. Go to Control Panel > Administrative Tools > Services, double-click the SVNService service, and change its startup type from "Manual" to "Automatic". Now Subversion will start every time you start Windows.  然后进入windows的服务管理窗口,将手动改成自动,以后就可以随开机启动了。。。
    5. Start the SVNService service (by selecting it in the Services list, and clicking the "play" toolbar button). 启动SVNService服务
    6. Go back to a command prompt, and type svn ls svn://localhost/
      This will list all the files in the root of the repository. If all is well and you've got a real Subversion server running now, you should see: monkey/ 返回cmd窗口,可以svn ls svn://localhost,查看 所有的项目
  6. Install TortoiseSVN 下面安装小乌龟 就不说了
    Sure, you can get by with a command-line client, but TortoiseSVN is cool — it integrates Subversion into Windows Explorer. You get little overlay icons showing the status of each file (in sync, needs to be checked in, not yet in the repository, etc.), and you can do pretty much everything you need by right-clicking on files and folders.
    1. Run the TortoiseSVN installer you got back in part I.
    2. Create a monkey directory somewhere on your hard drive. Right-click somewhere in that folder and select "SVN Checkout..." Type svn://localhost/monkey/trunk/ for the repository URL and click OK.
    3. Create a file in that directory, any file. Right-click the file and select TortoiseSVN > Add. Notice the little plus-sign icon that appears.
      The file hasn't actually been checked in yet — Subversion's commits are both batched and atomic, so this new file, together with any other new files you added, any files you changed, any files you deleted, any files you renamed, any directories you added or deleted or renamed, will all show up on the server all at once, as a single revision and a single checkin, the next time you right-click and select "SVN Commit".
  7. Make it run on the network
    Are you kidding? You're already networked. Go to another computer on your LAN, install TortoiseSVN, and do an "SVN Checkout...". When you specify the repository URL, use the same URL you did before, but replace "localhost" with the actual name of the computer that's running the Subversion service (so in my case, the repository URL is svn://marsupial/monkey/trunk/ — nice little menagerie, there).

And there ya go — Subversion up and running on Windows, in mere moments or less.

Corrections, questions, etc. on this document are, as always, welcome; just speak up in the comments. Now go forth and control your revisions.

原文地址: http://www.excastle.com/blog/archive/2005/05/31/1048.aspx

 

0
2
分享到:
评论

相关推荐

    WINDOWS下安装SUBVERSION服务端和TORTOISESVN客户端详细教程.doc

    WINDOWS下安装SUBVERSION服务端和TORTOISESVN客户端详细教程

    Windows下Subversion安装使用

    Windows下Subversion安装使用 Windows下Subversion安装使用

    Windows下Subversion的安装和配置

    博文链接:https://tvjody.iteye.com/blog/216108

    Windows安装配置SubVersion

    在Windows环境下安装配置SubVersion(简称SVN),是一项重要的版本控制管理任务。SVN是一种集中式的版本控制系统,被广泛应用于软件开发团队,以帮助开发者们追踪代码的变化历史、管理不同版本间的差异、支持分支与...

    subversion64 windows版,可在windows下一键安装

    在Windows环境下,Subversion 的64位版本提供了更高效的数据处理能力,适用于处理大型项目或需要大量内存的场景。这个"subversion64 windows版"是一套专为Windows操作系统设计的一键安装解决方案,简化了在Windows...

    Subversion for Windows安装指南

    #### 二、Windows环境下安装Subversion服务器 - **环境需求**: - 操作系统: Windows 2000 Server with SP4 - Apache HTTP Server: Apache_2.0.63-win32-x86-no_ssl.msi - SSPI: mod_auth_sspi-1.0.2-2.0.54.zip ...

    Subversion Edge详细安装与使用手册

    - **运行安装程序**:运行可执行文件 `SubversionEdge3.2.1(Windows32-bit)` 进行安装,默认情况下安装路径为 C 盘。 - **配置 Java 环境变量**:如果安装 Subversion Edge 前没有安装 Java 和 Python,那么安装过程...

    Windows上的服务器端安装(Subversion).doc

    ### Windows上的服务器端安装(Subversion)详尽指南 #### Subversion(SVN)概述与服务器端安装 Subversion,简称SVN,是一种集中式的版本控制系统,广泛应用于软件开发领域,用于管理源代码及其历史版本。在Windows...

    TortoiseSVN 针对 Windows 平台的 Subversion 客户端

    TortoiseSVN 针对 Windows 平台的 Subversion 客户端

    Windows环境下Collabnet_Subversion_Edge与Trac集成安装方法

    ### Windows环境下Collabnet Subversion Edge与Trac集成安装方法详解 #### 一、概述 在软件开发过程中,源代码的版本控制与项目追踪是非常重要的环节。Collabnet Subversion (SVN) 和 Trac 是两个广泛使用的工具,...

    windows下subversion v1.6.12

    windows环境下的subversion

    Windows下安装Apache subversion 域认证.docx

    在Windows环境下搭建Apache Subversion(SVN)服务器并实现域认证的过程相对复杂,但通过以下步骤,你可以成功地创建一个安全且高效的版本控制系统。以下是详细的操作指南: 首先,你需要下载Apache HTTP Server的...

    Setup-Subversion-1.8.0-1.msi在windows下的安装文件

    Setup-Subversion-1.8.0-1.msi在windows下的安装文件

    Windows下安装SVN服务器

    Windows环境下安装SVN服务器的知识点主要包括以下几个方面: 1. 系统与版本的选择: - 本文实例使用的是Windows Server 2003 R2 Enterprise X64 SP2(64位),同时适用于Windows Server 2003 X86 SP2、Windows XP ...

    Windows下Subversion服务器搭建指南

    总之,搭建Windows下的Subversion服务器涉及下载、安装、创建版本库、配置权限、备份与恢复等多个步骤。理解每个步骤并正确执行,就能成功搭建一个功能完善的Subversion服务器,为团队的协同开发提供强大支持。

    安装Subversion 服务

    这个文件通常位于Subversion安装目录下的conf子目录。 6. **创建服务**: 使用`sc`命令创建一个新的系统服务,例如: ``` sc create SVNService binPath= "C:\Program Files\Subversion\svnserve.exe --service ...

Global site tag (gtag.js) - Google Analytics