Quickly build SVN server under CentOS

Source: Internet
Author: User

Tag: for CentOS User POS system Add user startup code Systems Service

Do not say the principle, only the steps, with the quickest way to build up the service.

1, the system environment used in this article
# Uname-r

2.6.32-642.11.1.el6.x86_64
# Cat/etc/system-release
CentOS Release 6.8 (Final)

2. Update the system
# yum-y Update

3. Install Subversion and view the installation status
# yum-y Install Subversion
# RPM-QL Subversion

You can enter a command to try
# SVN--help

4. Configure System Services
Create a repository directory
# mkdir-p/opt/svndata/repos

To create a version library
# svnadmin Create/opt/svndata/repos

The following files are then generated in this directory
# ls-l

Total Dosage 24
Drwxr-xr-x 2 root root 4096 December 6 14:17 conf
Drwxr-sr-x 6 root root 4096 December 6 14:37 DB
-r--r--r--1 root root 2 December 6 13:56 format
Drwxr-xr-x 2 root root 4096 December 6 13:56 Hooks
Drwxr-xr-x 2 root root 4096 December 6 13:56 Locks
-rw-r--r--1 root root 229 December 6 13:56 README.txt

5. Configuration of service parameters
Repository configuration files in the Conf directory:
(1) Authz permission control file
(2) passwd is the account password file
(3) Svnserve.conf SVN service configuration file

6. Set Account password
# VI passwd
Add users and passwords to the [users] block
[Users]
admin = 654321
Newbie = 123456

7, set the user's access rights
# VI Authz
Add the following code at the end:
[/]
Admin=rw
Newbie=r
The admin has read and write permissions, and the newbie has readonly permissions.

8.
Modify the Svnserve.conf file
# VI Svnserve.conf
anon-access = Read anonymous user readable
Auth-access = Write Authorized user writable
password-db = passwd which file to use as the account file
authz-db = Authz which file to use as permission file
Realm =/opt/svndata/repos authentication space name, repository directory

9.
Start the SVN repository
Svnserve-d-r/opt/svndata/repos

10.
The service installation is complete.

Quickly build SVN server under CentOS

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.