CentOS 6.4 Build SVN server

Source: Internet
Author: User

As a new generation of code versioning tools, SVN has many advantages, such as convenient management, clear logic, high security and high code consistency. There are two ways of SVN data storage, BDB (Transaction Security table type) and FSFS (a storage system that does not require a database), and FSFS is a more secure and more user-safe way to avoid locking data when a server connection is interrupted. There are two ways to run SVN, one is a standalone server, the other is to use Apache services, each with pros and cons, the following describes the two approaches to their respective deployment steps.

One. Run as a standalone server,

1. Install Subversion

#yum Install Subversion

#mkdir-P/OPT/SVN//Create SVN directory

#chmod R 777/OPT/SVN//Modify directory permission to 777

#svnadmin Create/opt/svn/repos//Create an SVN version repository repos (repos name itself)

#cd/opt/svn/repos/conf//Enter the configuration file directory under the Repos repository

Modify the three configuration files in this directory

1) svnserve.conf//Configure repository information and user file and user password file path, repository path

#vim svnserve.conf

Modify several places:

#anon-access = Read

#auth-access = Write

#password-db = passwd

The #号去掉 in front of these three lines cannot have spaces at the far left of each line, and can be changed to the following:

Anon-access = None//read change to None

auth-access = Write

Password-db = passwd

Realm = repos//change to your own version library

Save exit

2) Modify the Authz file to create permissions for SVN group and group users

#vim Authz

[Group]

Repos = test,test1//Create a repos group and add 2 users Test,test1

[/]//Modify permissions under the root directory

@repos = RW//repos Group user's permissions are read-write

Test = RW//test User's permissions are read-write

* = r//Other user's permissions are read-only

3) passwd file Create or modify user password

#vim passwd

Test = test//user name Test password is test

Test1 = test1//password for user named Test2 is test2

Save exit

Two. Set up boot file

1. Edit/etc/rc.local

The contents of the file are as follows (add a line below touch/var/lock/subsys/local)

#!/bin/sh

#

# This script is executed *after* all and the other init scripts.

# can put your own initialization stuff in here if you don ' t

# want to does the full Sys V style init stuff.

Touch/var/lock/subsys/local

Svnserve-d-r/opt/svn/repos

Three. Start the SVN service

1. Start the SVN service, the SVN service default port is 3690, you can use the "NETSTAT-NTLP" command to see if the service started successfully:

#svnserve-D-r/opt/svn/repos

If you already have SVN running, you can run it on a different port.
Svnserve-d-r/opt/svn/repos–listen-port 3391

So that the same server can run multiple Svnserve

2. After successful launch, you can use the

A. It is recommended to use TORTOISESVN with the connection address: Svn://your Server addr (if you need to add ports to the specified port: port number

B. or connect using the command line:

SVN Co svn://ip/

It can be used after the connection.

CentOS 6.4 Build SVN server

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.