Install SVN Subversion server on Windows

Source: Internet
Author: User
Tags tortoisesvn

The current subversion is stable enough and has entered its prime time. We can see that a large number of projects are using it to complete version control work. This document describes how to install a Subversion server on Windows. The environment used in this article is as follows:

Operating System Windows XP Professional SP2 Try to use the original version as much as possible, because some of my friends reflected on some pirated XP instances similar to tomato garden, and the Subversion server software exception caused by the optimization of internal files.
Server Software Setup-Subversion-1.6.5.msi Windows MSI installer with the basic Win32 binaries-embedded des binaries for Apache 2.2.x (2.2.9 or higher is required within the 2.2.x Series)
Client Software TortoiseSVN-1.6.5.16974-win32-svn-1.6.5.msi Common GUI clients
Client Software Slik-Subversion-1.6.5-win32.msi Command line tool. If you are used to using the command line of CVs, you will be very comfortable with this

Subversion home page is http://subversion.tigris.org/or you can click here to download the Setup-Subversion-1.6.5.msi directly
Tortoisesvn home page is http://tortoisesvn.tigris.org/You can also click here to download the TortoiseSVN-1.6.5.16974-win32-svn-1.6.5.msi directly

First we install and run Setup-Subversion-1.6.5.msi installation interface is relatively simple, we focus on the installation location, assuming we install in the default location c: \ Program Files \ Subversion
Now we create a repository and use the svnadmin command. In this example, we need to create a repository under c: \ svnroot. The command line we use is as follows:

C: \ Program Files \ subversion \ bin> svnadmin create c: \ svnroot
C: \ Program Files \ subversion \ bin>

After the repository is created, we need to perform some simple configuration on the server. Open the conf directory under c: \ svnroot, edit svnserve. conf, and modify the content.
Auth-access = write
Password-DB = passwd
Anon-access = read
Remove the # above and open the comment.
Modify anon-access = none at the same time
Now the svnserve. conf snippet looks similar

[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
Auth-access = write
### The password-DB option controls the location of the password
### Database file. Unless you specify a path starting with /,
### 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
### Directory containing this file. If you don't specify
### 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 shocould
### Have the same password database, and vice versa. The default realm
### Is repository's UUID.
# Realm = my first Repository

After svnserve. conf is modified, modify the passwd file. Add the username Joe and password 123 that we need. The passwd content is as follows:

### This file is an example password file for svnserve.
### Its format is similar to that of svnserve. conf. As shown in
### Example below it contains one section labeled [users].
### The name and password for each user follow, one account per line.

[Users]
# Harry = harryssecret
# Sally = sallyssecret
Joe = 123

Now you can start the server. There are many methods to start. Here we will introduce two methods for the environment in this article. One is called in deamon mode, and the other is called in Windows service mode.
If it is called in deamon mode, the command line is as follows:

C: \ Program Files \ subversion \ bin> svnserve-d-r C: \ svnroot

After the server starts running, we can focus on the client issues. I have nothing to say about tortoisesvn installation, that is, one-way next. Here we will describe our project for test. Take this document as an example. Assume that the directory of our project is D: \ mytemp \ svn_test1. The directory contains a file test1.txt. On svn_test1, right-click and choose tortoisesvn-> Import. In URL of repository, enter SVN: // 192.168.159.129/svnroot and click OK. Enter the user name and password as prompted to import the project to subversion.
. Now, let's try it. Let's take a look at the content we just imported and start normal update and commit work. Delete all files in svn_test1. Then, right-click the svn_test1 directory and select SVN checkout URL of repository. The input is still SVN: // 192.168.159.129/svnroot checkout directory. The input is D: \ mytemp \ svn_test1 checkout depth: select the fully submit file.

Open the test1.txt file and try to modify and update it. We added a line in test1.txt, "Harbin City, Gao Hongwei QQ: 21807822". Then we right-click the svn_test1 directory and select SVN commit. In the message, we can enter some logs to mark this modification, click OK and enter the user name and password as prompted to submit the job. The update operation is similar, but opposite.

The operations on the interface are not easy to express in text, but the interface is very intuitive. I believe you can do it with your work. In order to ensure the continuity of the article, we did not explain how to use Windows service to call server. The command to generate the svn service is as follows:

C: \> SC create SVN binpath = "C: \ Program Files \ subversion \ bin \ svnserve.exe-service-R C: \ svnroot "displayname =" Subversion server "depend = TCPIP start = auto
C: \> Net start SVN

Pay special attention to the use of SC commands. Pay attention to the spaces behind = and the svn path.
1. if you have not successfully created the service, do not install it in the Program Files directory because it contains a space. You can install it in a simple directory and try again, for example, c: \ svn_server.
2. If such a simple directory is installed, it cannot be created. Note that there is a space behind the equal sign of binpath. You must write in the above format.
3. If this is not the case, you can configure all the environments in the same way as this article, and then paste them directly to ensure your operation is successful. And so on. You re-install it again as you want to see where your problem is, so there is a comparison.
I will not discuss about slik-Subversion here. It is a command line tool. In general, the GUI can meet your simple needs. If you have higher requirements, you can study them again. It is as easy as CVS. Thank you very much for reading my article. If you have any questions, please contact me QQ: 21807822, E-mail: dukejoe@163.com reprint please indicate the source

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.