SVN Server Setup

Source: Internet
Author: User

First, SVN introduction

Subversion is a free, open source version control system. Subversion stores files in the central repository. This repository is much like an ordinary file server, but it can record every file and directory modification. This allows you to restore the data to a previous version and to see the details of the changes to the data. Subversion is a project under the Apache Foundation, the official website of https://subversion.apache.org/.


Second, install SVN

# yum -y install subversion=============================================================== ============== package                      Architecture         Versions                      Source           size ======================================================================== ===== is installing: subversion                  x86_64     1.7.14-10.el7           base     1.0 m Install: apr      for dependencies                     x86_64     1.4.8-3.el7            base      103 k apr-util                    x86_64     1.5.2-6.el7             base      92  k neon                        x86_64     0.30.0-3.el7            base     165 k  pakchois                    x86_64     0.4-10.el7              base      14 k perl                        x86_64      4:5.16.3-286.el7       base      8.0 m perl-carp                   noarch     1.26-244.el7            base      19 k perl-Encode                 x86_64      2.51-7.el7             base      1.5 M perl-Exporter               noarch     5.68-3.el7              base      28 k perl-File-Path              noarch     2.09-2.el7              base       26 k perl-File-Temp              noarch     0.23.01-3.el7           base      56 k perl-Filter                 x86_64     1.49-3. el7             base       76 k perl-getopt-long           noarch      2.40-2.el7             base       56 k perl-HTTP-Tiny              noarch     0.033-3.el7             base      38 k perl-pathtools              x86_64      3.40-5.el7             base       82 k perl-Pod-Escapes            noarch     1:1.04-286.el7          base      50 k perl-pod-perldoc            noarch     3.20-4.el7              base      87 k perl-Pod-Simple             noarch     1:3.28-4.el7            base     216 k  perl-Pod-Usage             noarch      1.63-3.el7              base      27 k perl-Scalar-List-Utils      x86_64     1.27-248.el7            base      36 k perl-socket                 x86_64     2.010-3.el7             base      49 k  perl-storable              x86_64      2.45-3.el7              base      77 k perl-Text-ParseWords        noarch     3.29-4.el7              base      14 k perl-time-hires             x86_64      4:1.9725-3.el7         base      45 k perl-time-local             noarch     1.2300-2.el7            base      24  k perl-constant               noarch     1.27-2.el7              base      19 k perl-libs                   x86_64      4:5.16.3-286.el7       base     687  k perl-macros                 x86_64     4:5.16.3-286.el7       base       43 k perl-parent                 noarch     1:0.225-244.el7         base      12 k perl-podlators              noarch     2.5.1-3.el7             base     112 k  perl-threads                x86_64     1.87-4.el7              base      49 k perl-threads-shared         x86_64     1.43-6.el7              base      39 k subversion-libs             x86_64     1.7.14-10.el7           base     921 k#  svnversion --version                    # #查看SVN软件版本  svnversion, version  1.7.14  (r1542130)     compiled in &NBSP;NOV&NBSP;20&NBSP;2015,19:25:09 All rights reserved   (C)  2013 Apache  Software Foundation. This software contains a lot of people's contributions, please check the file  NOTICE  for more information. subversion  is an open source software, see <  http://subversion.apache.org/  site.


Third, configure and start SVN

① Creating an SVN repository

# mkdir -p /etc/svn/repos                        # #创建版本库 # svnadmin create  /etc/svn/repos/               Total dosage of   # #创建SVN版本库 # ls -la /etc/svn/repos/ 16drwxr-xr-x. 6 root root    80 7 Month    4 15:53 .drwxr-xr-x. 3 root root    18 7 month    4 15:49  Drwxr-xr-x. 2 root root   51 7 Month    4 15:53 conf          # #存储版本库配置文件的目录drwxr-sr-x. 6 root root  4096 7 Month    4 15:53 db     ## All version-controlled data that SVN wants to manage-r--r--r--.  1 root root    2 7 month &NBSP;&NBSP;&NBsp;4 15:53 format # #用来表示版本库布局版本号的整数drwxr-xr-x. 2 root root 4096 7 Month    4 15:53 hooks    # #存储钩子脚本模版的目录drwxr-xr-x. 2 root  root   39 7 Month    4 15:53 locks   ## Directory storing SVN repository lock data-rw-r--r--.  1 root root  229 7 month    4 15:53  readme.txt


② Configuring the Version Library

# cat/etc/svn/repos/conf/svnserve.conf |grep "" |grep-v "#" anon-access = none # #使非授权用户无法访问auth-acces                       s = Write # #给予授权用户写权限password-db = passwd # #指向保存用户帐号密码的文件的位置, here use relative path authz-db = Authz # #访问控制文件realm = repos # #认证命名空间, SVN will be displayed in the authentication prompt, and as the keyword of the credential cache



③ Configuration passwd

# cat/etc/svn/repos/conf/passwd |grep-v "#" [Users]zhi = 12345 # #前面用户名, back password


④ Configuring Authz Permissions

# vi/etc/svn/repos/conf/authz[groups] admin = zhi[/] @admin = r

Comments:

A A.1 user group can contain 1 or more users, separated by commas.

B. Repository Directory format:
[< Repository >:/project/catalog]
@< user Group Name > = < permissions >
< user name > = < permissions >
Where the box number can be written in several ways:
[/], indicating the root directory and the following, the root directory is specified at svnserve startup, and we specify as/etc/svn/,[/] means to set permissions on all repository.
[repos:/] means setting permissions for the repository repos;
[REPOS:/ABC] means setting permissions on the ABC project in the Repository repos;
[REPOS:/ABC/AAA] means setting permissions on the AAA directory of the ABC project in the Repository repos;
A permission principal can be a user group, user, or *, and the user group is preceded by @,* to represent all users.

C. Permissions can be W, R, WR, and NULL, which means no permissions.


⑤ Start SVN

# systemctl Stop firewalld# svnserve-d--listen-port 8888-r/etc/svn# ss-tlnp |grep svnlisten 0 7 * : 8888 *:* Users: (("Svnserve", pid=1803,fd=3))

Comments:

-D: Indicates running in daemon mode (running in the background);

--listen-port 8888: The use of 8888 port, you can replace the port you need;

-R/ETC/SVN: Specifies that the root directory is/ETC/SVN


Iv. Connecting SVN

Windows Download TortoiseSVN, official website https://tortoisesvn.net/, you can also download the corresponding version of the Chinese package to Chinese. (Note: The version must correspond, otherwise cannot be Chinese.) After installing the download of the Chinese Language pack installer, in the TortoiseSVN right-click menu, in the Settings option, select Simplified Chinese.


After installation, right-click =====>tortoisesvn=====> Repository Browser =====>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/83/EB/wKiom1d_c_CjyJZ_AAAVp1r_i9w460.png "title=" QQ picture 20160708173453.png "alt=" Wkiom1d_c_cjyjz_aaavp1r_i9w460.png "/>

(Note: If you click "OK" the option expected appears because the svnserve.conf configuration file is not shelf written. )

=====> Click "OK" to enter your username and password =====>

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/83/EB/wKioL1d_d6mBeKrmAABYjCJbBU8681.png "title=" QQ picture 20160708174828.png "alt=" Wkiol1d_d6mbekrmaabyjcjbbu8681.png "/>

=====>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/83/EB/wKioL1d_e0nTkOW0AACcNFmbWCU465.png "title=" QQ picture 20160708175345.png "alt=" Wkiol1d_e0ntkow0aaccnfmbwcu465.png "/>


This article is from the Notepad blog, so be sure to keep this source http://wangzhijian.blog.51cto.com/6427016/1812737

SVN Server Setup

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.