Installation and configuration of SVN server under CentOS

Source: Internet
Author: User
Tags svn svn client centos

1, the Installation SVN service side:

[Root@localhost ~]# Yum Install subversion

2, to determine whether the installation of SVN success:

[Root@localhost ~]# Svnserve--version
Svnserve, Version 1.6.11 (r934486)
...
3, create the SVN library directory

[Root@localhost/]# Mkdir/opt/svn/repos-p
[Root@localhost/]# svnadmin Create/opt/svn/repos
[Root@localhost/]# ll/opt/svn/repos/
Total 24
Drwxr-xr-x. 2 root 4096 APR 2 11:22 conf
Drwxr-sr-x. 6 root 4096 APR 2 11:22 db
-r--r--r--. 1 root 2 Apr 2 11:22 format
Drwxr-xr-x. 2 root 4096 Apr 2 11:22 Hooks
Drwxr-xr-x. 2 root 4096 Apr 2 11:22 Locks
-rw-r--r--. 1 root 229 Apr 2 11:22 README.txt
[Root@localhost/]# ll/opt/svn/repos/conf/
Total 12
-rw-r--r--. 1 root 1080 Apr 2 11:22 Authz
-rw-r--r--. 1 root 309 APR 2 11:22 passwd
-rw-r--r--. 1 root 2279 Apr 2 11:22 svnserve.conf
which
Authz is permission control, you can set which users can access which directories
PASSWD is to set the user and password
Svnserve.conf is setting up SVN-related parameter configuration

4. Configure Users and Permissions

4.1 Set user name and password first:
[Root@localhost/]# cd/opt/svn/repos/conf/
[Root@localhost conf]# VI passwd
[Users]
# Harry = Harryssecret
# sally = Sallyssecret
Hello = hi123
This creates a hello user with a password of hi123
4.2 Configuring permissions
[Root@localhost conf]# VI Authz
[/]
Hello = RW
Indicates that the Hello user has read and write access to all directories
4.3 Configuring SVN authentication and Permissions
[Root@localhost conf]# VI snvserv.conf
Modify the parameters of the [general] node and cancel the # comment
Anon-access = none # makes unauthorized users inaccessible
auth-access = Write # Enables authorized users to have writing permission
Password-db = passwd
authz-db = authz # access Control file
Realm =/opt/svn/repos # authentication namespace, Subversion will be displayed in the authentication prompt, and as a key to the voucher cache.

With the default configuration, the above statements must be below write, the left can not leave blank, otherwise there will be errors.

5, Start svn:

[Root@localhost ~]# svnserve-d-r/opt/svn/repos
The default port is 3690, and if you need to specify a port, use the following command:
[Root@localhost ~]# svnserve-d-r/opt/svn/repos--listen-port 9527

6, SVN Client Access SVN (if the port is the default 3690 can be omitted to write):

Svn://ip:port

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.