Build a local SVN server under Windows

Source: Internet
Author: User
Tags tortoisesvn

This article introduces the method of building the local SVN server under Windows, the online data is relatively few and old, Most of the old version of SVN is about using Svnserve.exe to install the SVN service, and the following will detail the use of the SC command to set up the server and open the service, which is the key to building a local SVN server!

SVN full name is Subversion, it is an open source version control software, website link: http://tortoisesvn.net/, and its similar software has cvs,vss,clearcase. SVN, as a cross-platform open source software, has a strong vitality and is now quite mature, and many open source projects use it to manage documents or code. More SVN details to view Baidu Encyclopedia Link: http://baike.baidu.com/view/183128.htm

More importantly, it is not just team development, as individual projects (or documents that individuals want to maintain) can be managed with SVN instead of needing another server.

TortoiseSVN is a Windows shell extension app from SVN that helps users visualize the various operations of SVN without the need to use the command line.

To install SVN (Subversion), follow these steps:
1. Download & Install Subversion for Windows client TortoiseSVN:
installation package Link: http://tortoisesvn.net/downloads

2. Build Repository (Repository):

It can be thought of as the database where the data is stored on the server, and all SVN operations are stored here.

Under directory D:\svn\repository "right->tortoisesvn->create Repository here, after executing this directory, a series of directories and files are created automatically

3. Configure users and permissions:

Open D:\svn\repository, you will find that there are a number of directories and files, open the Conf subdirectory, open the svnserve.conf file, where the line before the usual # is equal to the note is ignored, you can remove the # Let the line take effect, or you add new lines. The English notes in this section have explained the meanings of the various settings, and finally, the contents of the line without the # number before you set the [General] subsection are:

Anon-access = None
auth-access = Write
Password-db = passwd

The meaning is:

Unauthenticated user does not have any permissions (if you modify none to read is to give Read permission)
Authenticated user giving Write permission (readable, of course)
Password data is stored in the passwd file

Then open the passwd file of the same directory to set up the account:

Similarly, there are no # numbers before the rows in the [users] subsection, for example:

admin=123456

The meaning is:

The password for user admin is 123456

4. Run a standalone server: (the old version of SVN needs to use the Svnservice.exe, the new version of the DOS (CMD) operation window with the SC command to set up the server and open services)

SC create Svnservice binpath= "E:\TortoiseSVN\bin\svnserve.exe--service-r F:\svn\repository" Displayname= "Svnservice "Depend= Tcpip start= Auto

The BinPath path represents the Svnserve.exe file path under the installation directory of SVN, and the-R is the root shorthand, F:\svn\repository is the previously configured repository path, and DisplayName is the name of the SVN service set; start= Auto Sets the SVN service to boot!

Finally, the SVN service is turned on:
net start Svnservice
(You can perform "services.msc" in "Start-to-run ..." and then open the "svnservice" service in the graphical interface, just as you would with the above statement!) )

Of course we can create a bat one-key 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

Install only need to change the bat file inside the 2 paths can simplify the command input, lazy people must be the way ah, there are wood!

5. Initialize the import:

To put it simply is to take the SVN control file directory to the SVN, this step to determine the SVN corresponding path! (Note: The file directory is only initialized as an import, and the subsequent SVN operation has nothing to do with, can be deleted), the general operation is as follows:

Right-click on the directory where you need to make version control, select TortoiseSVN, select submenu " Import ...", set "Vault url" to Svn://localhost/foldername (FolderName is random, Once determined, the SVN operation path is this one! ), click OK and you will be prompted to import the file.

It is important to note that this is the case of the SVN file library and the SVN service is the same computer, so can be used localhost, other machines if you want to access the SVN service, you should use the IP address of the SVN://SVN server, for example svn://192.168.1.125

6, the client basic operation:

Update, Commit, etc.

Create a directory to be used to host the version control project, which is used to store the last updated version of the directory after the initial import, and the program is written and modified in this directory. For example, E:\project, then right-click on this directory in this directory, execute the SVN checkout command to update the SVN directory (will be required to build the server side set the user admin password 123456), Commit to Repository (Repository) after local modifications are completed

Now that the local SVN server is built under Windows, you will see that E:\project and the files below are marked with green checkmark!

Also attached:
1. Stop the Service
Use "net stop Svnservice" to stop the service.
2. Delete Service
If there is a problem with the service installation, you may need to remove the service. To delete a previously added service, you only need to run "SC delete Svnservice".


Build a local SVN server under Windows

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.