How to install and deploy the SVN server on windows

Source: Internet
Author: User
Tags svn client

How to install and deploy the SVN server on windows

Tools/Raw Materials
Operating System: Windows2003, 32-bit
SVN Server: svn-win32-1.6.16
SVN Client: TortoiseSVN-1.6.16.21511
Method/step
I. Preparations
1. SVN server: Decompress the package and download the latest version from the official website.
2. SVN client: TortoiseSVN, a common small turtle, is a client program used to communicate with the server.
Ii. Install servers and client programs
1. SVN server: directly decompress the file to a folder. Example path: c: \ svn \
Note: If you are downloading the msi program, simply run and follow the prompts to install it.
2. SVN client: run the command and install it as prompted. Example path: C: \ Program Files \ Subversion
3. Create a version Library (Repository): Example path: e: \ svnroot. There are two methods to create a version Library:
Method 1: Create an empty directory e: \ svnroot \ repos1, enter the repos1 folder, right-click in the blank area, and select "TortoiseSVN-> Create Repositoryhere ...",
Method 2: Create an empty directory e: \ svnroot \ repos2, enter the DOS command line, and enter the following command:
Svnadmincreate e: \ svnroot \ repos2


4. Run the SVN server and start the service. There are two ways to start a service:
Method 1: start the service temporarily. Run the following command in DOS:
Svnserve-d-r e: \ svnroot \ repos1 -- listen-host IP Address -- listen-port = port number
Description: "listen-host" and "listen-port" are optional. The default port is 3690. If the port is already in use, you can use the listen-port option to specify the port number.
Note: Do not close the command line window. closing the window will stop the svn service.
Method 2: Start the SVN service to run the program in the background:
SC create svnserve binPath = "c: \ svn \ bin \ svnserve.exe -- service-r e: \ svnroot \ repos1" displayname = "Subversion" depend = Tcpip start = auto
Description 1:
(1) SC is a service configuration program that comes with windows. Svnserve is the service name. You can name it as needed.
(2) The binPath parameter indicates the installation path of the svnserve executable file.
The signature path is included in a pair of double quotation marks.
(4) displayname indicates the name displayed in the windows Service list. depend = Tcpip indicates that the tcpip service is required to run the svnserve service, and start = auto indicates that the service runs automatically after it is started. After the service is installed, svnserve will not run automatically until the next boot.
NOTE 2:
(1) There is no space before the equal sign of binPath, and there is a space behind the equal sign. The same applies to displayname, depend, and start. The front of the service is --, not-, and the front of the r is -.
(2) To uninstall the svn service, run SC delete svnserve.
(3) from "SC" to "auto" is in the same command SC and must be written in the same line.
(4) start the service command netstart svnserve and stop the service command net start svnserve. You can also access the interface provided by Windows to operate the SVNService service, that is, Control Panel> service.
(5) If the path contains spaces, you must use "\" to process the "logs". If svnserve.exe is in "c: \ programfiles \ svn, the command should be written as "binpath =" \ "c: \ programfiles \ svn \ bin \ svnserve.exe \"


5. Configure users and permissions
(1) Modify svnserve. conf. In the e: \ svn \ repos1 \ conf directory, open svnserve. conf in a text editor:
Set:
# Anon-access = read
# Auth-access = write
# Password-db = passwd
Change
Anon-access = read
Auth-access = write
Password-db = passwd
Note:
There is no space in front of anon-access and other columns.
Anon-access = read indicates that only the read permission is allowed if the user name and password are not used for Logon. If the user name and password are changed to none, the user name and password cannot be accessed.
Auth-access = write indicates that the user has the write permission to log on through the user name and password (of course, the read permission also exists)
Password-db = passwd indicates that users can be added to the passwd file by username = password.
(2) modify the passwd file in the same directory and add a user account:
Set:
[Users]
# Harry = harryssecret
# Sally = sallyssecret
Add account:
[Users]
# Harry = harryssecret
# Sally = sallyssecret
Admin = admin
Add an admin account with the password admin.
6. initialize SVN and import data
Right-click the folder to be uploaded to SVN and choose TortoiseSVN> Import... in the "URL of repository" dialog box, enter "svn: // localhost/project1 /". In "Importmessage", enter a comment and click OK. Enter the account and password admin.
7. Test SVN
Local test: Create an empty folder test1, right-click it, select "SVN Checkout", and enter "svn: // localhost/project1" in "URL of repository ".
Test on other machines: If the IP address of the host running svnserve is 1.2.3.4, the URL is entered with "svn: // 1.2.3.4/project1 ".

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.