Add to favorites: simple notes for setting up SVN servers in Linux

Source: Internet
Author: User
Add a Linux SVN server to favorites. simple memo yuminstallsubversion # install svngroupaddsvn # set a special user group for running svn. this operation is not required, but is recommended.

1.Yum install subversion# Install svn

2.Groupadd svn# Set a dedicated user group for running svn, which is not required, but is recommended

3.Useradd-g svn# Set a dedicated user for running svn, which is not required, but is recommended

4.Passwd svn# Set a password for the user who runs svn. this operation is not required, but is recommended.

5.Mkdir-p/var/svn# Create/var/svn as the root directory for centralized repo storage

6.Chgrp svn/var/svn; chown svn/var/svn# Handing over directories to svn users

7.Su-l svn# Switch to svn for subsequent operations

8.Mkdir-p/var/svn/default-repo# Create a folder for the code library to be created

9.Svnadmin create/var/svn/default-repo/# Create a code library,/var/svn/default-repo/is the folder where the code library is located

10.Cd/var/svn/default-repo/conf# Go to the conf Directory of the newly created code library and prepare for relevant configuration

11.Vim svnserve. conf# Configure authentication:

[Plain]View plaincopy
  1. Anon-access = read # Anonymous User readable
  2. Auth-access = write # authorized users can write
  3. Password-db = passwd # specify the account and password configuration file. by default, the file is located in the same directory as svnserve. conf, that is, conf /.
  4. Authz-db = authz # specify the permission configuration file. by default, the file is located in the same directory as svnserve. conf, that is, conf /.
  5. Realm = default-repo # authentication domain. this value will display the "authentication domain" name prompted during login. the default value is a UUID assigned to this version Library, we can set it to the version Library name.
12. Vim passwd# Setting accounts and passwords


Add the user and password to the [users] block. Format: account = password, for example:

[Plain]View plaincopy
  1. [Users]
  2. Laurence = 123
13. Vim authz# Set the user's read and write permissions. format:


Add at the end of the file:

[Plain]View plaincopy
  1. [/]
  2. Laurence = rw


[] Is used to define the target folder for which permissions are applied. this is set to the root directory.

Row 2: account = permission, r: Read, w: Write

14.Svnserve-d-r/var/svn/default-repo/# Start svn server (default port 3690)

Note: the same server can run multiple svnservers. you only need to change the port at startup: svnserve-d-r/var/svn/another-repo/-- listen-port 3691

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.