SVN configuration – Server side (Linux)

Source: Internet
Author: User
Tags svn root access tortoisesvn

SVN configuration – Server side (Linux) this tutorial configuration instructions
    • Objective: To achieve unified code management
1. Download the required source code package

Files such as subversion-deps-1.6.17.tar.gz SVN support Library

wget http://subversion.tigris.org/downloads/subversion-deps-1.6.17.tar.gz
    • 1
    • 1

Subversion-1.6.17.tar.gz SVN's main program

wget http://subversion.tigris.org/downloads/subversion-1.6.17.tar.gz 
    • 1
    • 1
2. Source code compilation and installation

These two are going to be unpacked in the same directory.

tar zxvf subversion-deps-1.6.17.tar.gz  tar xvf subversion-1.6.17.tar.gz cd subversion-1.6.17 ./configure --prefix=/opt/svn
    • 1
    • 2
    • 3
    • 4
    • 1
    • 2
    • 3
    • 4

Compiling the source code:

make make install  
    • 1
    • 2
    • 1
    • 2
3. Configure Environment variables
    • 1
    • 1

In/etc/profile last add:

PATH=$PATH:/opt/svn/bin  
    • 1
    • 1

Detect if the installation was successful

svnserve --version  
    • 1
    • 1

Displaying the following information indicates that the installation was successful.

svnserve, version 1.6.17 (r1128011)  compiled Mar 23 2012, 16:57:41  
4. Create an SVN repository

A. Creating an SVN library TESTSVN

mkdir /var/svn
    • 1
    • 1

B. Enter the SVN directory

cd /var/svn  
    • 1
    • 1

C. Create a TESTSV directory

create testsv
    • 1
    • 1

D. After successfully creating the warehouse TESTSV, you can view the relevant directory under the warehouse.

cd testsv  ls
    • 1
    • 2
    • 1
    • 2

In the warehouse TESTSV, if you can see the following directory, the warehouse was created successfully:

Conf db format Hooks Locks README.txt

To view the configuration file for a warehouse:

cd conf/  ls
    • 1
    • 2
    • 1
    • 2

There are three configuration files for the View warehouse:

Authz passwd svnserve.conf

5. Configure Repository Information # #

A. Configuring svnserve.conf

Under the Conf directory, edit:

vi svnserve.conf 
    • 1
    • 1

Add the following code:

[general]  anon-access = none  auth-access = write password-db = passwd authzauthz-db = authz realm = testsv[sasl] 
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7

Note:
* Main add Authz, passwd path, and the name of the library
* This path refers to a relative path, which refers to the current repository under the Conf directory. If necessary, you can set the path to an absolute path

B. Defining user passwords

vim /var/svn/testsv/conf/passwd 
    • 1
    • 1

Add the following:

[users]  #这个是原文件中就有的哟~wzf = 123456    testuser = testsv123456testuser1 = 123456 
    • 1
    • 2
    • 3
    • 4
    • 1
    • 2
    • 3
    • 4

Meaning: "=" to the left is the user name, "=" to the right is the password for that user name. Only users under this file are eligible to log in to the repository.

C. Define Repository access rights
Edit Authz

vi /var/svn/testsv/conf/authz
    • 1
    • 1

Edit as follows:

[aliases]   Average[groups]admin=wzfusers=testuser,testuser1   [/]*=  @admin=rw@users=r  
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11

Meaning explanation
* Define the Admin group, the members under this group include WZF
* Define the Users group, under which members include Testuser,testuser1
* Multiple members separated by "," can not be divided into a specific group of users
* Admin group members in repository root/under have read ' R ' and write ' W ' right
* Members of the Users group are only entitled to read ' r ' in the repository root directory
* In addition to the admin and Users group members, other users in the repository root directory/do not have any rights

6. SVN Start-up

Create a user to start SVN

useradd svn  passwd svn  
    • 1
    • 2
    • 1
    • 2

Follow the prompts to set a password for the user svn

7. Set up Warehouse Group # #

Allow user svn access to Repository

-R svn:svn /var/svn  
    • 1
    • 1
8. Start SVN

Start with a set account

-d -r /var/svn/ --listen-port 9999
    • 1
    • 2
    • 1
    • 2

which
Su svn means to start svn as user svn
-d means running in daemon (background run)
–listen-port 9999 means using 9999 ports, which you can replace with the ports you need. But note that using the end of 1024 or less
Port requires root access
-r specifies that the root directory is/VAR/SVN

Client (Windows): 1. Install the Windows client

If there is no TORTOISESVN client, you can go here to download: tortoisesvn.net/downloads.html, according to their actual situation to download the corresponding version, click here to download TORTOISESVN client.

2. Local synchronous Warehouse Code
    1. Select a local folder to hold the code downloaded from the server.
    2. Then right click on this folder and select "SVN CheckOut ...".
3. Log in to the warehouse

Fill in the warehouse address (URL), other places can not be modified. Version can be modified to indicate the beginning of the specified version number.


* The URL in this article is svn://10.10.108.107:9999/testsv/)
After clicking OK


* Enter account number, password can be

Specific reference TORTOISESVN client use method

SVN configuration – Server side (Linux)

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.