Installation Process and User Manual of SVN on centos 6.3

Source: Internet
Author: User
Tags version control system tortoisesvn

I. SVN Introduction

Subversion (SVN)Is an open-source version control system, that is, the Subversion manages data that changes over time. The data is stored in a central data repository (repository. This archive is similar to a common file server, but it will remember every file change. In this way, you can restore the file to the old version or view the file change history.

 

Some frequently used concepts in SVN:

(1) Repository (source code library): the place where the source code is stored in a unified manner;

(2) checkout (extraction): When you have no source code, you need to copy it from repository checkout;

(3) commit: When you have modified the code, you need to commit it to repository;

(4) Update: When you have already checkout a copy of the source code, you can update the source code on the repository, and the code on your hand will have the latest changes;

 

How SVN works:

The daily development process is actually like this (assuming you have been checkout and have been working for a few days): Update (get the latest code) --> make your own modifications and debug them successfully --> commit (you can see your modifications ).

If the two programmers modify the same file at the same time, SVN can merge the changes made by the two programmers. In fact, SVN manages the source code in the unit of behavior, that is, if the two programmers do not modify the same program, SVN automatically merges the two changes. If the row is the same, SVN will prompt the file confict, conflict, You need to manually confirm.

 

Client software:

Tortoisesvn is a common client software in windows. It is a free open-source client. : Http://tortoisesvn.net/downloads.html

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/47/70/wKioL1P604-i-SluAALJcg565I0261.jpg "Title =" qq20140825140406.png "alt =" wKioL1P604-i-SluAALJcg565I0261.jpg "/>

 

Subversion provides the following functions:

(1) directory version control:

Cvs can only trace the history of a single file, but subversion controls the file system as a "virtual" version to track changes to the entire directory by time. Directory and file version control.

 

(2) real version history:

Since CVS limits the file version record, CVS does not support operations that may occur on the file but may affect the content of the Directory, such as copying and renaming. In addition, in CVS, you cannot replace a file that has the same name but does not inherit the old version history or is irrelevant. In subversion, you can add, delete, copy, and rename files or directories. All newly added files start with a new and clean version.

 

(3) automatic submission:

A commit action is neither updated to the archive nor completely updated. This allows developers to establish and submit changes in logical intervals to prevent problems when some submissions are successful.

 

(4) Metadata included in version control:

Each file and directory contains a set of attribute keywords that are associated with the attribute values. You can create and store any key/value pair you want. Attribute version control over time, just like file content.

 

(5) Select different network layers:

Subversion has an abstract archive access concept, which makes it easy to operate on new network mechanisms. Subversion can be embedded into the Apache HTTP Server as an extension module. This provides advanced stability and collaborative working capabilities for subversion. In addition, it also provides many important functions: for example, identity authentication, authorization, online compression, and file library browsing. There is also a lightweight independent Subversion server that uses custom communication protocols and can be easily used in the tunnel mode through SSH.

 

(6) Consistent data processing methods:

Subversion uses the binary difference algorithm to represent differences between files. It treats both text (understandable) and binary (incomprehensible) files equally. These two types of files are also stored in the archives in the compressed form, and the file difference is transmitted over the network in two directions.

 

(7) valid branch and Tag ):

The consumption of branches and labels does not have to be proportional to the project size. The method used to create a branch and a label in Subversion is to copy the project. The method used is similar to hard-link ). Therefore, these operations only take a small amount of time and are fixed.


Ii. Installation and Use process:

1. Install yum directly in Linux:

[[Email protected] ~] # Yum install Subversion


2. After installation, you can configure the relevant configuration files. In fact, the configuration mainly involves creating a source code library (also called a version Library) first ), the command used to create a version library is as follows:

[[Email protected] ~] # Svnadmin create/data/www/SVN


3. Configure related configurations in the version library, set the user access permissions, and add access users. In the created version library, we can see three files in the conf folder, these three files are the configurations we want to modify:

Authz passwd svnserve. conf

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/47/70/wKioL1P61j-A01A4AAA4qtOpP-g229.jpg "Title =" qq20140825141600.png "alt =" wKioL1P61j-A01A4AAA4qtOpP-g229.jpg "/>

(1) svnserve. conf: SVN service configuration file

(2) passwd: user name and password file.

(3) authz: Permission configuration file.


4. Modify the three files;

[[Email protected] conf] # Vim svnserve. conf

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/47/6F/wKiom1P61e7Q__uAAAI3zMlsKOI089.jpg "Title =" qq201408251420.6.png "alt =" wkiom1p61e7q1_uaaai3zmlskoi089.jpg "/>

Anon-Access: controls the permissions of non-authenticated users to access the version library.

Auth-Access: control the permission of the authenticated user to access the version library.

Password-DB: Specifies the username and password file name.

Authz-DB: Specifies the permission configuration file name, which can be used to implement path-based access control.

Realm: Specifies the authentication domain name (that is, the name of the version Library) prompted during logon ). If the two versions of the database have the same authentication domain, we recommend that you use the same user name and password data file.


[[Email protected] conf] # Vim passwd

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/47/6F/wKiom1P61qjTxtebAABQGf3Y3M4787.jpg "Title =" qq20140825142224.png "alt =" wkiom1p61qjtxtebaabqgf3y3m4787.jpg "/>


[[Email protected] conf] # Vim authz

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/47/71/wKioL1P62KrTB0a-AAEW-Uwxa7M143.jpg "Title =" qq20140825142615.png "alt =" wKioL1P62KrTB0a-AAEW-Uwxa7M143.jpg "/>


If the version library has multiple folders and different permissions need to be assigned, you only need to add the [version library name:/file directory] item. How many files can be used, for example:

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/47/71/wKioL1P62i_SC8yLAAFIHRn2Zv0729.jpg "Title =" qq20140825143236.png "alt =" wkiol1p62i_sc8ylaafihrn2zv0729.jpg "/>


Version library directory. if the version library you created is/data/www/SVN, enter your directory name in the format of [directory name:/]

@ Follow the group name and specify the group permissions. * = indicates that no group in the group has the permission;


Now, we can start the service;

[[Email protected] ~] # Svnserver-d-r/data/www/

-D: Indicates running in the background;-R: indicates the path of the version library to be running. If the path of the version library you created is/data/www/SVN, you only need to specify/data/WWW to view the port;

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/47/71/wKioL1P62-SywiMUAAE3QYSjUTQ053.jpg "Title =" qq20140825144003.png "alt =" wKioL1P62-SywiMUAAE3QYSjUTQ053.jpg "/>

OK. Here we have installed and configured the relevant permissions and users. Then we will install the Windows client to test it.


Three, install Windows client SVN, to the official website to download the client, by the way the Chinese package is also downloaded together: http://tortoisesvn.net/downloads.html

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/47/6F/wKiom1P62_vRyxR-AAKXuaNr-Os007.jpg "Title =" qq201408251420.3.png "alt =" wKiom1P62_vRyxR-AAKXuaNr-Os007.jpg "/>


After downloading the client, you can continue to run next. This is not enough. After installing the client, you can install the Chinese package. After installing the Chinese package, you must set it and change it to Chinese:

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/47/71/wKioL1P63ffRb1PMAAFSOFzYJ3U573.jpg "Title =" qq20140825144850.png "alt =" wkiol1p63ffrb1pmaafsofzyj3u573.jpg "/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/47/70/wKiom1P63TmBcR6RAAKX_c8mJTM891.jpg "Title =" qq20140825144934.png "alt =" wkiom1p63tmbcr6raakx_c8mjtm891.jpg "/>


After that, we can use it. Find a directory for storing the source code, right-click the blank space, and select SVN check:

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/47/70/wKiom1P63jTifT4-AAGdQAj-i3k144.jpg "Title =" qq20140825145433.png "alt =" wKiom1P63jTifT4-AAGdQAj-i3k144.jpg "/>


After you click OK, a dialog box for entering the user name and password is displayed:

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/47/71/wKioL1P63_3zGJ-xAAC-6yNzus8909.jpg "Title =" qq20140825145731.png "alt =" wKioL1P63_3zGJ-xAAC-6yNzus8909.jpg "/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/47/70/wKiom1P635Hg2WEgAAGsZNwXMpw780.jpg "Title =" qq20140825145841.png "alt =" wkiom1p635hg2wegaagsznwxmpw780.jpg "/>


Now, we have built SVN, so that we can use it completely. If you have any questions, please leave a message below. I will try my best to answer your questions. Thank you.

This article from the "warm boiled frog" blog, please be sure to keep this source http://tanxw.blog.51cto.com/4309543/1544680

Installation Process and User Manual of SVN on centos 6.3

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.