Setup and configuration of svn server under centos (no apache version)

Source: Internet
Author: User

Setup and configuration of svn server under centos (no apache version)
# Installation and deployment

1. Check whether earlier versions of SVN are installed.

Rpm-qa subversion

[Root @ Svn tools #] rpm-qa subversion

# Uninstall command

Yum remove subversion

2. Install svn

Yum install subversion

# Create a folder named svndata and svnpasswd

Mkdir-p/var/svn/{svndata, svnpasswd}

# Start the SVN root directory of the specified service of the SVN Service

Svnserve-d-r/var/svn/svndata/-pid-file =/var/svn/svndata/svn. pid

3. view the SVN process:

[Root @ Svn tools #] ps-ef | grep svn | grep-v grep

Root 27543 1 0? At 00:00:00 svnserve-d-r/var/svn/svndata/-pid-file =/var/svn/svndata/svn. pid

Check SVN Port:

[Root @ Svn tools #] netstat-ln | grep 3690

Tcp 0 0: 3690: * LISTEN

4. Create a version Library

# Create a new Subversion project trunk and test

Svnadmin create/var/svn/svndata/trunk
Svnadmin create/var/svn/svndata/test

Configure to allow user test read/write access

Cd/var/svn/svndata/trunk/conf/

Vi svnserve. conf Modification

========================================================== ==========

Anon-access = none

Auth-access = write

Password-db =/var/svn/svnpasswd/passwd

Authz-db =/var/svn/svnpasswd/authz

Note: Each parameter in svnserve. conf must be written in the top level, and there must be no spaces at the beginning.

Cp authz passwd/var/svn/svnpasswd/

Authz Configuration:

Cd/var/svn/svnpasswd/

Vi authz

Add

#################################

[Groups]

# Define Group Permissions

Ftp = admin // group ftp can access the trunk project, while admin is a member of the group
User = test // user of the user group can access the test project, and test is a member of the group.
# Define a directory

[Trunk:/]
@ Ftp = rw // members in the ftp group have read and write permissions
[Test:/]
@ User = rw
#################################

Tip: Pay attention to the method used to write the authz permission format.

1. In authz, each parameter must be written in the top-level format and cannot start with a space.

2. For a group, you do not need to start.

Passwd file user and password settings

Vi passwd

Add:

#######################

# User = passwd

Test = test
Admin = admin

######################

Tip:

1. The SVN account is used before the equals sign and the svn password is used after the equals sign.

2. When you change svnserve. conf, You need to restart SVN and change authz and passwd files without restarting them.

Restart SVN command <not required>

Kill-USR1 'cat/var/svn/svndata/svn. Pi' or killall svnserve

Svnserve-d-r/var/svn/svndata/-pid-file =/var/svn/svndata/svn. pid

Tip: When svnserve. conf is changed, SVN needs to be restarted to change authz and passwd files.

The server has been deployed.

Connection:
Connect through the svn client. Because apache is not available, webpage access is not supported.
Svn: // 192.168.1.105/trunk

Username admin password admin
Svn: // 192.168.1.105/test
User name test password test

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.