Linux (Centos) quickly builds SVN

Source: Internet
Author: User
Tags svn svn client version control system

Objective

The source code or documentation in the project needs to be managed and versioned, with a lot of version control systems, such as VSS, CVS, SVN, Git, and so on. SVN is still very common now, take notes summary to carry on the blog, SVN this does not put in later estimate can only write git constructs.


I. Introduction to SVN

SVN is the abbreviation for Subversion, is an open source version control system, compared to RCS, CVS, it uses the branch management system, its design goal is to replace CVS. Many version control services on the Internet have migrated from CVs to subversion. It's easy to say. SVN is used for multiple people to jointly develop the same project, sharing resources for the purpose.

The SVN server operates in 2 ways: stand-alone servers and operate with Apache. Both ways have pros and cons, users can choose their own.

Download URL: https://subversion.apache.org/packages.html

This paper mainly constructs the SVN server for CentOS, and the continuous integration of Jenkins often requires the SVN command to perform some operations.

If you prefer a faster and simpler way, please use the Windows version: VisualSVN Server, which is downloaded at the bottom of the above address page.

Two. Install SVN (Linux)
1. Install SVN Yum-Y InstallSubversion

Note: To install quickly, use the root user

2. View the installation content and location RPM-QL subversion

3. Create the SVN root directory
mkdir/data/svn

4. New repository: Testcode
Svnadmin create/data/svn/ Testcode

Note: After execution, the file description in the/data/svn/testcode directory

README.txt documentation for the repository
Conf profile folder (the folders with the most subsequent actions)
DB SVN data File folder
Format version number of the current repository
Hooks SVN's Hooks script folder
Locks svn file Lock related folders

4.TestCode Library Add users, assign permissions

A. Configuring SVN

vim/data/svn/ Testcode/conf/svnserve.conf
Anon-access=none #去除文件前的注释, change read to None to prevent anonymous access
auth-access= Write#去除文件前的注释
password-db= passwd#去除文件前的注释
Authz-db = Authz #去除文件前的注释, access rights configuration, very important, do not open, group permissions do not take effect


B. Adding access to Testcode users

vim/data/svn/ Testcode/conf/ passwd


[Users]
# Harry = Harryssecret
# sally = Sallyssecret
albert= 123456
findyou= 123456
Abc= 123456
Love= 123456

Note: Four + users added

c. Setting the added user rightsvim/data/svn/ Testcode/conf/authz

[ groups]
G_qa=albert,findyou
G_read=abc

[ Testcode:/] #[< repository name >:< path;]
@g_qa =rw #< User Group > = < permissions >, the first way
@g_read =r #< User Name > = < permissions >, the second way
Love=r
*= #* = < permissions;, the Third Way, * for any user, this is to prohibit anonymous user access

Note: Albert,findyou can be read and writable, ABC, love readable, other inaccessible.

D. Firewall Open SVN port passIptables-a input-p TCP--dport 3690-j ACCEPT


E. Turning on the SVN serviceSvnserve-d-R/DATA/SVN

Note: Command write script, boot execution, if need to stop SVN, with "Ps-ef|grep svn" to find the process; "Kill-9 process number".

F.SVN Client Access

Svn://ip/testcode

Cases:

if reproduced please retain the source and the author's name Findyou, thank you!


Linux (Centos) quickly builds SVN

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.