前几天装SubVersion,在google上搜了一把,按国内的帖子的步骤,总报SVN_EDITOR找不到的错,无奈只好放下了。今天硬着头皮看了下老外写的安装指南,一下搞定,原来前几天搜的帖子少了增加SVN_EDITOR为环境变量的步骤。今天把老外的帖子转到这来。
-
Download everything
- 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下面的软件都没装。
- Go to http://dark.clansoft.dk/~mbn/svnservice/ and download SVNService.zip.
- 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.)
-
Install the server and the command-line client
- Run svn-x.y.z-setup.exe and let it install stuff.
- 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.
-
Create a repository and configure access
- 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.
- Open a command prompt and type: svnadmin create "C:\Documents and Settings\svn_repos"
- 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:
- 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.
- 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.
-
Start the server manually, and create a project
- In your command window, type: svnserve --daemon --root "C:\Documents and Settings\svn_repos"
- Open a second command window, and type svn mkdir svn://localhost/monkey
- 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.
- 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 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.)
- 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).
-
Start the server for real
- Go back to the command window that's running svnserve. Hit Ctrl+C to stop it.
- 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.
- In a command prompt, type svnservice -install --daemon --root "C:\Documents and Settings\svn_repos"
- 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.
- Start the SVNService service (by selecting it in the Services list, and clicking the "play" toolbar button).
- 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/
-
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.
- Run the TortoiseSVN installer you got back in part I.
- 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.
- 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".
-
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
分享到:
相关推荐
Windows下Subversion安装使用 Windows下Subversion安装使用
WINDOWS下安装SUBVERSION服务端和TORTOISESVN客户端详细教程
博文链接:https://tvjody.iteye.com/blog/216108
在Windows环境下,Subversion 的64位版本提供了更高效的数据处理能力,适用于处理大型项目或需要大量内存的场景。这个"subversion64 windows版"是一套专为Windows操作系统设计的一键安装解决方案,简化了在Windows...
在Windows环境下安装配置SubVersion(简称SVN),是一项重要的版本控制管理任务。SVN是一种集中式的版本控制系统,被广泛应用于软件开发团队,以帮助开发者们追踪代码的变化历史、管理不同版本间的差异、支持分支与...
在安装完成 Subversion 之后,需要建立一个版本库(Repository)。版本库是服务器上集中存放和管理数据的地方。新建一个空文件夹作为版本库文件夹,并输入命令行 svnadmin create <文件夹路径>,其中<文件夹路径>为...
- **运行安装程序**:运行可执行文件 `SubversionEdge3.2.1(Windows32-bit)` 进行安装,默认情况下安装路径为 C 盘。 - **配置 Java 环境变量**:如果安装 Subversion Edge 前没有安装 Java 和 Python,那么安装过程...
Setup-Subversion-1.8.0-1.msi在windows下的安装文件
需要注意的是,在安装过程中保持网络畅通至关重要,因为安装脚本会自动从互联网上下载必要的组件。此外,正确配置 Apache 和 Trac 的相关配置文件也是非常重要的步骤,以确保两者能够正常协同工作。
TortoiseSVN 针对 Windows 平台的 Subversion 客户端
windows环境下的subversion
在Windows环境下搭建Apache Subversion(SVN)服务器并实现域认证的过程相对复杂,但通过以下步骤,你可以成功地创建一个安全且高效的版本控制系统。以下是详细的操作指南: 首先,你需要下载Apache HTTP Server的...
在安装 Subversion 之前,你需要一个Linux服务器环境,例如 CentOS 或 Ubuntu。同时,确保你拥有适当的权限,最好是创建一个专门的用户(如 `svnroot`)来管理 Subversion,而不是使用 root 用户。服务器的IP地址...
在Windows环境下搭建Subversion(简称SVN)服务器是软件开发团队进行版本控制的重要步骤。Subversion是一个开源的版本控制系统,允许多人协作编辑和管理文件,同时保持文件历史记录,便于团队成员之间的协作和代码...
### Subversion服务器端安装及...通过上述步骤,你可以成功地在Windows XP环境下安装并配置Subversion服务器,实现版本控制功能。这对于团队协作开发非常重要,可以有效管理源代码的变化历史,提高软件开发效率和质量。
Windows环境下安装SVN服务器的知识点主要包括以下几个方面: 1. 系统与版本的选择: - 本文实例使用的是Windows Server 2003 R2 Enterprise X64 SP2(64位),同时适用于Windows Server 2003 X86 SP2、Windows XP ...