Build a local SVN server

 

1. Download the required program from the official website
http://tortoisesvn.net/downloads.html
2. Install the client


  1. Install TortoiseSVN according to the method of installing general software. After successful installation, right-click anywhere, and the pop-up menu is as follows:
                                                                                                                                                              3. Create a repository (Repository)
    Create a folder svn under the F drive, this folder is used to save all your The established database
    creates a subfolder SampleRepository under svn, and then creates a database in SampleRepository for our example. The
    creation
    method
    is: Right-click under SampleRepository, select TortoiseSVN -> Create Repository here...

    Then select Native filesystem (FSFS )

    After the successful creation, the directory structure is shown in the figure below. Do not easily change the contents of this folder.                  4. Import (import...) the directory structure of the project data. This step is to let the database established above understand the directory structure of the project data. Create a sample project folder Sample under svn, namely C:\ProjectSVN\Sample Create three subfolders under Sample tags, trunk, branches Right-click under Sample and select import...





    In this way, you can import the file directory structure of your project into the database . Fill in file:///

    F:\svn /SampleRepository

    in the URL of Repsitory , note that file: is followed by three ///                    5. Configure users and permissions Go to
    F:\svn \Sample\conf under the database you just created , and modify svnserve.conf
    # [general]
    # password-db = passwd
    Change it to:
    [general]
    password-db = passwd
    Then modify the passwd file in the same directory
    # [users]
    # harry = harryssecret
    # sally = sallyssecret
    Change it to
                 [users]
                 harry = harryssecret
                 sally = sallyssecret
    where the left side is the username and the right side is the password
    If you want to add a new username and password, you can create it in a new line, such as: username = password 6. Start the service
    When Subversion is successfully installed, it has been added to the path, so open and run cmd below, and enter the following command to start the Subversion service, so that the client can access it.


    Adding
    F:\svn at the end of the command is to tell svn our Where are the databases placed, plus this is very important, otherwise the client may report an error that the database cannot be found

7. In point 6, the command line must be opened, the service can be opened, and the client can be connected. Below we use the service as a self-starting service:

cmd into the system32 directory: type:

sc create svnserve binPath= "\"C:\Program Files\TortoiseSVN\bin\svnserve.exe\" --service --root F:\svn" displayname= "svnserve" depend= Tcpip start= auto

 

A successful message is prompted to be considered successful, and the service can be started.

 

 

If the service is not started, an error will be reported:

TortoiseSVN: Unable to connect because the target machine actively refused

 

   client

  1. Install TortoiseSVN first
  2. In the client's project folder, right-click and select SVN CheckOut...
    This will checkout the data from the server.
    If you access a database with a password, you will also be asked to enter a username and password.


     

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326483715&siteId=291194637