Build a local SVN server in Windows

Source: Internet
Author: User
Tags tortoisesvn

Build a local SVN server in Windows

This document describes how to use svnserve.exe to install the svn service. This document describes how to use the SC command to create a server and enable a local SVN server!

SVN full name is Subversion, it is an open source version control software, official link: http://tortoisesvn.net/, similar to its software CVS, VSS, ClearCase. As a cross-platform open-source software, SVN is very dynamic and has been quite mature. Many open-source projects use it to manage documents or code. More svn details can see Baidu encyclopedia link: http://baike.baidu.com/view/183128.htm

More importantly, it is not only team development, but also SVN management for independent projects (or documents that I want to maintain) without the need for another server.

TortoiseSVN is a Windows Shell extension application of SVN. It helps you to perform various SVN operations without using command lines.

To install SVN (Subversion), follow these steps:
1. download and install the Subversion Windows client TortoiseSVN:
Installation Package link: http://tortoisesvn.net/downloads

2. Create a version Library (Repository ):

It can be seen as a database for storing data on the server. All svn operations are stored here.

Right-click the Directory D: \ svn \ repository and choose TortoiseSVN> Create Repository here. After executing this directory, a series of directories and files are automatically created.

3. Configure users and permissions:

Open D: \ svn \ repository, and you will find that there are more directories and files, open the conf subdirectory, and open svnserve. conf file. All the lines in front of this line are ignored by comments. You can remove # To make the line take effect, or add new lines by yourself. the English comments in the preceding Section have detailed the meanings of various settings. Finally, if you set the [general] section, the content without # before the bank of china is as follows:

Anon-access = none
Auth-access = write
Password-db = passwd

Meaning:

Unauthenticated users do not have any permissions (if none is changed to read, read permission is granted)
The authenticated user can grant the write permission (of course, the user can also read)
Password data is stored in the passwd file

Then open the passwd file in the same directory to set the account:

Similarly, set the content without the # sign before the row in the [users] section, for example:

Admin= 123456

Meaning:

The user admin password is 123456.

4. Run the independent server: (the old version of svnservice.exe is used for svnservice.exe. The new version is changed to the dos (cmd) operation window. Run the SC command to create the server and enable the Service)

SC create svnservice binPath = "E: \ TortoiseSVN \ bin \ svnserve.exe -- service-r F: \ svn \ repository" DisplayName = "svnservice" depend = Tcpip start = auto

Binpath.exe represents the svnserve.exe file path under the svninstallation directory;-r is short for root; F: \ svn \ repository is the version library path configured earlier; DisplayName is the name of the svn service set; start = auto: Set the svn service to start when it is started!

Finally, enable the svn service:
Net start svnservice
(You can execute "services. msc" in "start-> Run...", and then enable the "svnservice" service on the graphical interface, which is the same as executing the preceding statement !)

Of course, we can create a bat-pilot to run the above command:

SC create svnservice binPath = "E: \ TortoiseSVN \ bin \ svnserve.exe -- service-r F: \ svn \ repository" DisplayName = "svnservice" depend = Tcpip start = auto
Net start svnservice
Pause

During installation, you only need to change the two paths in the bat file to simplify the command input. It is a must-have method for lazy people!

5. initialize the import:

Simply put, the file directory that requires svn control is first imported to svn. In this step, the corresponding svn path is determined! (Note: This file directory is only used as the import initialization. It has nothing to do with subsequent svn operations and can be deleted at will.) The general operations are as follows:

Right-click the directory where you want to perform version control, select TortoiseSVN, and then select Sub-menu "import... ", set" repository url "to svn: // localhost/folderName (folderName is random. After confirmation, the svn operation path will be this one later !), Click OK and the system will prompt that the file is being imported.

Note that the svn file library and svn service are on the same computer, so localhost is available. If other machines want to access the svn service, svn should be used: // svn Server IP address, such as svn: // 192.168.1.125

6. Basic client operations:

Update, commit, etc.

Create a directory to store the version control project. It is used to store the latest version of the directory after initialization and import. The program compilation and modification are completed in this directory. For example, E: \ project, right-click this directory on this directory, run the SVN Checkout command to update the svn directory (the admin password 123456 set on the server is required). After the local modification, commit the command to the version Library (Repository ).

Now, after setting up a local SVN server in Windows, you will see that E: \ project and the following files are marked with a green check mark!

Appendix:
1. Stop the service
Use "net stop svnservice" to stop the service.
2. delete a service
If there is a problem with the service installation, you may need to delete the service. To delete the previously added service, Run "SC delete svnservice ".

-------------------------------------- Split line --------------------------------------

Subversion configuration instances in Linux

CentOS 6.2 SVN setup (YUM installation)

Deploy Apache + SVN in CentOS 6.5

Build an SVN server using Apache + SVN

Set up and use the SVN server in Windows + reset the password on the client

Install SVN in Ubuntu Server 12.04 and migrate Virtual SVN data

Build svn service and migration method on Ubuntu Server

Build SVN server with online storage

-------------------------------------- Split line --------------------------------------

This article permanently updates the link address:

Related Article

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.