Continuous Integration II: Build SVN server (Subversion)

Source: Internet
Author: User

Installation Environment
Red Hat Enterprise Linux Server release 7.3 (MAIPO)
Jdk1.7.0_80
Subversion-1.10.3.tar.gz
Apr-1.6.5.tar.gz, apr-util-1.6.1.tar.gz, apr-iconv-1.2.2.tar.gz
Sqlite-autoconf-3250200.tar.gz

Subversion (SVN) is an Apache open Source version control system.
SVN server has 2 modes of operation: Standalone server and Apache. There are pros and cons to each of the 2 ways, this article explains the use of a standalone server to create HTTP access later with Apache.

file:/// Direct repository access (local disk).
/HTTP By configuring the WebDAV protocol of the Subversion Apache server.
https:// Similar to/HTTP, but includes SSL encryption.
svn:// Standalone server access via Svnserve Service custom protocol. such as svn://ip:3690/
svn+ssh:// Similar to svn://, but encapsulated via SSH


1. Yum Installation: Yum install Subversion

2. Download the offline installation package:
SVN installation package: subversion-1.10.3.tar.gz,:http://subversion.apache.org/download.cgi
Database Dependency Package: sqlite-autoconf-3250200.tar.gz,:https://www.sqlite.org/download.html
Apr Dependent Packages: apr-1.6.5.tar.gz, apr-util-1.6.1.tar.gz, apr-iconv-1.2.2.tar.gz,:http://apr.apache.org/download.cgi
Zlib Dependency Package: zlib-1.2.11.tar.xz,:http://linux.softpedia.com/get/programming/libraries/zlib-159.shtml

3. Decompression and Installation
Check whether you have installed before installing
Rpm-qa|grep SVN
Rpm-qa|grep Apr
Rpm-qa|grep zlib

3.1 First install Apr
Reference: Continuous Integration II: Build SVN server--apache HTTP Server installation

3.2 Installation zlib Note: subversion1.10 may no longer depend on zlib

[Email protected] soft]$ xz-d zlib-1.2. One.Tar. Xz[[email protected] soft]$Tar-XVF zlib-1.2. One.Tar-c/home/Cluster[[email protected] zlib-1.2. One]$ cd/home/cluster/zlib-1.2. One[email protected] zlib-1.2. One]$./configure--prefix=/home/cluster/zlib-1.2. One[email protected] zlib-1.2. One]$ Make[email protected] zlib-1.2. One]$ Make Install

3.3 Installing SVN
#解压svn
[Email protected] soft]$ TAR-ZXVF subversion-1.10.3.tar.gz-c/home/cluster


#解压sqllite

[Email protected] ~]$ TAR-ZXVF sqlite-autoconf-3250200.tar.gz-c/home/cluster


#迁移sqllite到svn源文件目录下 and renamed Sqlite-amalgamation
[Email protected] ~]$ mv/home/cluster/sqlite-autoconf-3250200/home/cluster/subversion-1.10.3/sqlite-amalgamation

#配置
[Email protected] subversion-1.10.3]# cd/home/cluster/subversion-1.10.3

No--with-zlib in #注意 configuration parameters
[Email protected] subversion-1.10.3]# /configure--prefix=/home/cluster/subversion-1.10.3--with-apr=/home/ cluster/apr/apr-1.6.5--with-apr-util=/home/cluster/apr/apr-util-1.6.1--with-lz4=internal--with-utf8proc= Internal

Error 1:configure:error:subversion requires LZ4 >= r129, or use--with-lz4=internal
FIX:./configure command Add--with-lz4=internal option

Error 2:configure:error:subversion requires Utf8proc
FIX:./configure command Add--with-utf8proc=internal

#编译 Installation
[[email protected] subversion-1.10.3]# make && make install

3.4 Adding environment variables
[Email protected] local]# Vim/etc/profile

Export JAVA_HOME=/USR/LOCAL/JDK1. 7 . 0_80export svn_home=/home/cluster/subversion-1.10. 3 export PATH= $JAVA _home/bin: $SVN _home/bin: $PATH

[Email protected] local]# Source/etc/profile

#查看版本
[[Email protected] local]# SVN--version
[Email protected] local]# Svnserve--version

4. Create a Code version library
4.1 Create the SVN directory as the version home directory to create multiple

mkdir -p/home/cluster//home/cluster/svn && svnadmin Create test

4.2 Configuration

#修改配置svnserve. Conf[[email protected] conf]$ CD/home/cluster/svn/test &&lsAuthzpasswdsvnserve.conf[[email protected] conf]$ vim Svnserve.conf[general]anon-access =None # makes non-authorized users inaccessible Auth-access =Write# Enable authorized users to have write permissions password-db =/home/cluster/svn/test/conf/passwd# Indicates the password file path Authz-db =/home/cluster/svn/test/conf/Authz # Access control file Realm=/home/cluster/svn/Test # Authentication namespace, Subversion is displayed in the authentication prompt and is used as the keyword for the credential cache. #配置passwd used to create users [[email protected] conf]$ vimpasswd[Users]< user 1> = < password 1> Admin =Admin< user 2> = < password 2> UserName2 =Password2 can add multiple, this is the user name password pair. 

#配置authz Modify author User Rights control
[Email protected] conf]$ vim Authz
Instruction brief: This profile takes the path-based authorization policy, specifying the path in parentheses, and the following lists the authorizations for each user.
Includes read-only R, read-write RW.
If no users are listed, access is not allowed.
You can also group users, please refer to the SVN manual, the following is a simple example:

User group format:
[Groups]
< user group name > = < user 1>,< user 2>
Of these, 1 user groups can contain 1 or more users, separated by commas between users.

Repository directory format:
[< Repository >:/project/catalog]
@< user Group Name > = < permissions >
< user name > = < permissions >

Where the box number can be written in several ways:
/, which indicates the root directory and the following. The root directory is specified at svnserve startup, and we specify/HOME/CLUSTER/SVN. This means that the permissions are set for all repositories.
repos1:/, which indicates that permissions are set on version library 1
REPOS2:/ABC, which indicates that permissions are set on the ABC project in version Library 2
REPOS2:/ABC/AAA, which represents the AAA directory setting permissions on the ABC project in version 2

A permission principal can be a user group, user, or *, and the user group is preceded by @,* to represent all users. Permissions can be W, R, WR, and NULL, and NULL indicates no permissions.
Here is a simple example
[/]
* = RW

4.3 Start svn service

#启动命令: svnserve-d-R Version Library path--Listen port number #3690(default port, can also be specified by itself),--d-r/HOME/CLUSTER/SVN-- listen-port=3690#停止svn, kill process [[email protected] bin]$ Pkill svnserve

4.4 Developer Machine installs Windows SVN client TortoiseSVN
Download: https://tortoisesvn.net/downloads.html
Subversion and TORTOISESVN versions are best, at least the client version is higher than the server;
If you need to install TORTOISESVN's Chinese language Pack (language packs download below), you need to download the same as the client version.

#访问svn://134.32.123.102/test

Reference:
Https://liangzl.com/get-article-detail-18849.html
https://www.jianshu.com/p/7cfdc0086b5a
Https://www.cnblogs.com/wizzhangquan/p/4564089.html
74361650
52166331

Continuous Integration II: Build SVN server (Subversion)

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.