Install SVN service under Linux (CENTOS7)

Source: Internet
Author: User

1. Installation

CentOS (I use CentOS7) under the Yum command to complete the installation easily

To test whether the installation was successful:

2. Build the Repository

Create SVN Data directory (Subversion defaults to/VAR/SVN as the root of the data, boot start by default is also from here):

To create a repository:

If you delete a repository:

3. Configure the SVN configuration file

After each repository is created, the svnserve.conf primary profile will be generated. Edit it:

Editing examples:

[General]
Anon-access = None                #控制非鉴权用户访问版本库的权限
auth-access = Write                 #控制鉴权用户访问版本库的权限
Password-db = passwd #指定用户名口令文件名
authz-db = Authz                     #指定权限配置文件名
Realm = Wangwa                    #指定版本库的认证域, which is the authentication domain name that is prompted at login

4. Edit SVN user profile

[Users]
admin = admin                #用户, password
FUHD = FUHD                #用户, password
Test = Test                #用户, password

5. Edit the SVN privilege control configuration file

Editing examples:

[Groups]
admin = Admin         #admin为用户组, admin for user after equals sign
Test = Fuhd,test
[wangwa:/]                #表示根目录 (/var/svn/wangwa), Wangwa: The realm that corresponds to the previous configuration = Wangwa
@admin = RW            # indicates that the admin group has read and write permissions to the root directory, R is read, W is write
[Wangwa:/test]         #表示test目录 (/var/svn/wangwa/test)
@test = RW                #表示test组对test目录有读写权限

6. Start, view and stop SVN services

To start the SVN service:

Check out the SVN service:

7. Configure Firewall ports

First, make clear that the default firewall for CentOS7 is FIREWALLD. The default port for subversion is 3690, and if not opened, an error is added:

8. Set Boot up

In Centos7, set boot up:

#注意: The root directory must be/VAR/SVN so that it can be set successfully!!

#设置开机启动后就可以按下面的方式开启或停止服务了

Save exit, restart, and test from the client. If you report such a mistake: Svn:E204900:Can ' t open file '/var/svn/wangwa/format ': Permission denied error. That is the relationship with SELinux, at present I am not very likely to use SELinux, then the selinux shut down, back to learn, back to change this paragraph!!!! :

Temporary shutdown:

$ sudo setenforce 0

Permanently closed:

$ sudo vim/etc/sysconfig/selinux

Modify:

SELINUX = disable               #值修改为disable.

Install SVN service under Linux (CENTOS7)

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.