Deploying SVN server on Windows

Source: Internet
Author: User
Tags svn client tortoisesvn

    1. First, the preparatory work

      1, SVN server: Unpack the package, you can download the latest version from the official website.

      2, SVN client: TortoiseSVN, that is often said little turtle, is a client program, used to communicate with the server side.

    2. Second, install the server and the client program

      1, SVN server: Directly unzip to a folder. Example path: c:\svn\

      Note: If you are downloading an MSI program, run it directly and install it as prompted.

      2, SVN client: directly run as prompted to install. Example path: C:\Program files\subversion

      Note : The number of bits downloaded by the SVN client must be consistent with the number of bits in the operating system, otherwise error prone.

    3. Iii. Build a Repository (Repository): example path: E:\svnroot. There are two ways to build a repository:

      Method One, create an empty directory e:\svnroot\repos1, enter the Repos1 folder, right-click in the blank, select "Tortoisesvn->create repositoryhere ...",

      Method Two, create an empty directory E:\svnroot\repos2, enter the DOS command line, enter the following command:

      Svnadmincreate E:\svnroot\repos2

    4. Four, run the SVN server, start the service. There are two ways to start a service:

      method One, temporarily start the service , under DOS enter the following command:

      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, and if the port is already occupied, you can specify the port number through the option Listen-port.

      Note: Please do not close the command-line window, close the window will stop the SVN service.

      method Two, 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=TC Pip start= Auto

      Description One :

      (1) SC is a service configuration program that comes with Windows. Svnserve is the name of the service and can be named according to demand.

      (2) The parameter BinPath represents the installation path of the Svnserve executable file (the server-side installation directory ).

      (3)--service means to run as a Windows service,--r indicates the location of the svnrepository, and the service parameters and R parameters are all part of the binpath. So the path to Svnserve.exe is included in a pair of double quotes.

      (4) DisplayName represents the name displayed in the list of Windows services, DEPEND=TCPIP indicates that the Svnserve service needs TCPIP service, and Start=auto is automatically running after booting. After installing the service, the Svnserve will not run automatically until the next boot.

      illustration two :
      (1) BinPath has no space before the equals sign, and a space after the equals sign . DisplayName, depend, start also, service front is-, not-, and R Front is-.

      (2) To uninstall the SVN service, execute the SC delete svnserve.

      (3) from "SC" to "Auto" is in the same command SC, must be written on the same line.

      (4) Start the service command: Netstart svnserve, stop the service command: net start Svnserve, you can also go to Windows provides interface operation Svnservice Service, that is, control Panel services.

      (5) If the path includes spaces, be sure to use "\" Processing "" ", such as the above example if Svnserve.exe in" c:\programfiles\svn\ ", the command should be written as" binpath= "\" c:\programfiles\ Svn\bin\svnserve.exe\ "

    5. V. Configuring Users and Permissions

      (1) Modify the svnserve.conf, and in the e:\svn\repos1\conf directory, open the svnserve.conf with a text editor:

      Will:

      # anon-access = Read

      # auth-access = Write

      # password-db = passwd

      Switch

      Anon-access = Read

      auth-access = Write

      Password-db = passwd

      NOTES:

      There are no spaces in front of the anon-access column.

      Anon-access = read indicates that access is not logged through the user name password only, and if you change to none then no user name password cannot be accessed

      Auth-access = Write indicates written permission to log in with the user name password (the Read permission is also available)

      Password-db = passwd indicates that a user can be added to the passwd file by means of a user name = password

      (2) Modify the passwd file of the same directory, add the user account:

      Will:

      [Users]

      # Harry = Harryssecret

      # sally = Sallyssecret

      Add Account:

      [Users]

      # Harry = Harryssecret

      # sally = Sallyssecret

      admin = Admin

      Add an admin account, password is admin.

    6. Six, initialize SVN, import data

      Select the folder for which you want to upload svn, "right-->tortoisesvn import ..." and enter "svn://localhost/project1/" in the "URL of repository" of the popup dialog box. Enter the comment in "Importmessage", click OK, ask to enter the account number, enter the account admin and password Admin.

    7. 7

      Seven, Test svn

      Local test: Create a new empty folder Test1, right-click, select "SVN Checkout" and enter "Svn://localhost/project1" in "URL of repository".

      Other machine tests: If the host IP address running svnserve is 1.2.3.4, the URL entry is "Svn://1.2.3.4/project1".

      Reprint: http://jingyan.baidu.com/article/c74d60005d616f0f6a595d9e.html

Deploying SVN server on Windows

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.