SVN Linux server-side configuration

Source: Internet
Author: User
Tags version control system tortoisesvn

A. SVN introduction to Subversion is an open source version control system, which means that subversion manages data that changes over time. This data is placed in a central data archive (repository). This archive is very much like a regular file.Server, but it remembers every change in the file.  This way you can restore the file to the old version number, or browse the history of the document. Some of the concepts in SVN: (1). Repository (source code library) source of the Unified Storage place (2). Checkout (extract) When you do not have the source code, you need a copy from Repository Checkout (3). Commit (Commit) when you have changed the code, you will need to commit to Repository (4). Update (updated) when you have checkout a source, update you will be able to synchronize with the source code on the repository, you will have the latest changes in the current development process is actually this (if you have checkout and alreadyworkFor a few days): Update (Get the latest code)-Make your own changes and debug success-Commit (you can see your changes). Suppose two program apes change the same file at the same time, SVN can merge the two program ape changes, in fact, the SVN management source code is in the behavior unit, that is to say two program ape only if not changed the same line of program, SVN will take the initiative to merge two changes themselves.  Assuming that the same line, SVN will prompt the file confict, conflict, need to manually confirm. Client software: (1)WindowsFrequently used client software often uses TORTOISESVN. It is a free open source client.  : http://tortoisesvn.net/downloads.html (2) to MyEclipse, there are also some SVN plugins. Subversion provides the following main functions: (1) Folder version number control CVS can only track the history of a single file, but subversion has made a "virtual" version number control file system, you can track the entire folder changes by time.  Both folders and files can be controlled by version number. (2) True version number history since CVS has restricted the file version number records, CVS does not support actions that might occur on the file, but will affect the contents of the folder, like copying and renaming. In addition, in CVS you cannot replace a file that has been included in the system with a file that has the same name but does not inherit the history of the old version or has no relationship at all. In subversion, you can add (add), delete, copy (copy), and rename (rename), whether it's a file or a folder.  All of the newly added files start with a new, clean version number. (3) Voluntarily submit a commit action, not all updates to the archive, is completely not updated.  This will allow developers to create and commit changes in logical intervals to prevent problems that occur when partial submissions are successful. (4) Metadata included in version number control each file and folder is accompanied by a group of attribute keyword and associated with the property value. You can create and save whatever you want Key/value right.  The attribute is the version number control over time, just like the file content. (5) Choosing a different network layer Subversion has an abstract repository access concept that makes it possible to implement new network mechanisms very easily. Subversion can be embedded in Apache HTTP server as an extension module. This provides the most advanced stability and collaboration capabilities for subversion, but it also provides a number of important features: For example, authentication, authorization, online compression, file Vault browsing, and more.  Another lightweight standalone subversionserver, using its own defined communication protocol, is very easy to use via SSH in tunnel mode. (6) Consistent method of data processing Subversion uses a binary difference algorithm to differentiate between file differences, and it treats both types of text (human understandable) and binary files (which humans cannot understand) equally. These two types of files are equally compressed in the same waystored in the archive, and the file differences are transmitted over the network in two directions. (7) The Effective Branch (branch) and tag (tag) consumption on the branch and label do not have to be proportional to the size of the project. Subversion creates branches and labels by simply copying the project, using a method similar to a hard join (Hard-link).  So these operations only take a very small amount of time and are fixed. (8) HackabilitySubversion has no historical baggage of any kind; it is primarily a group of common C libraries with well-defined APIs. This makes Subversion easy to maintain and can be used by other applications and program languages.
Two. SVN Server build 2.1 Install SVN package with Yum for Yum Server Configuration reference: Linux build Yum Server Http://blog.csdn.net/tianlesoftware/archive/2 011/01/03/6113902.aspx
[email protected] ~]# Yum install-y Subversion
[[Email protected] ~]# Verify the installation version number:
[Email protected] ~]# Svnserve--version
  The following repository back-end (FS) modules is available: * Fs_base:module for working with a Berkeley DB reposit  Ory.  * Fs_fs:module for working with a plain file (FSFS) repository. 2.2 Create SVN version number library [[email protected] ~]# mkdir/u02/svn [[email protected] ~]# svnadmin CREATE/U02/SVN/DAVESVN & NBSP;--DAVESVN for version number library name 2.3  SVN configuration After creating a version number library, 3 profiles are generated under this folder: [[email protected] conf]# pwd/u02/svn/davesvn/c  onf [[email protected] conf]# ls authz  passwd  svnserve.conf (1) svnserve.conf:  SVN service configuration file.  (2) passwd:username password file.  (3) Authz: Privilege profile.  svnserve.conf file, the file configuration item is divided into the following 5 items: anon-access: Control non-authenticated users access to the version number library.  Auth-access:   Control authentication user access to version number library permissions.  PASSWORD-DB: Specifies the username password file name.  AUTHZ-DB: Specifies the name of a permission profile that enables path-based access control. Realm: Specifies the authentication domain for the version number library, which is the authentication domain name that is prompted at logon. It is also recommended to use the same username password data file Passwd file if the authentication domain of the two version number library: We enable this file in the svnserve.conf file.  Then configure for example the following: [[email protected] conf]# Cat passwd # # # # This file was an example password file for Svnserve. ###Its format was similar to that of svnserve.conf.  As shown in the # # example below it contains one section labelled [Users].  # # # The name and password for each user follow, one account per line. [Users] # Harry = harryssecret # sally = Sallyssecret Dave = davepwd Tianlesoftware = tianlesoftwarepwd Authz   Piece: Find a very good Configuration sample on the Web: [groups] admin = John, kate devteam1 = John, Rachel, Sally Devteam2 = Kate, Peter, Mark docs =  Bob, Jane, Mike training = Zak--Here we put different users in different groups, the following in the Set folder access permissions, the use of folders to operate the can. # Specify default access rules for all libraries # All people can read, administrators can write, critical molecules do not have any permissions [/]  --corresponding to my test:/u02/svn folder * = R @admin = rw Dangerman = # agree that developers can Have a complete interview with their project version number library [proj1:/] @devteam1 = RW [proj2:/] @devteam2 = RW [bigproj:/] @devteam1 = RW @devteam2 = rw Trevor = RW # The Document writer has write access to all the Docs folders [/trunk/doc] @docs = RW # Trainers are able to fully interview the training version number library [trainingrepos:/] @training = RW Below we configure our A Uthz file: [[email protected] conf]# cat Authz [groups] admin = Dave Dev=tianlesoftware [davesvn:/] @admin = RW @dev = RW [[[email protected] conf]# 2.4 Start and stop SVN Service (1) Start SVN service: [[[email protected] conf]# Svnserve- D-r/u02/svn-d indicates background execution-r specifies that the root folder is/U02/SVN [[email protected] conf]# Ps-ef | grep svn root      4592     1  0 18:04?        00:00:00 svnserve-d-r/u02/svn root      4594  3709  0 18:04 PTS/1    00:00:00 grep svn (2) Stop SVN service: Ps-aux |grep svn kill-9 process kills three.  The client connection to the SVN Server 3.1 installation TortoiseSVN client is described in the first section.  3.2 Find the folder of your own project, right click, do svn operation (1) New test folder SVN, go to right-click, point CHECKOUT:SVN Server IP address and version number library name. Create a new file svn.txt. Upload this file to Svnserver (add):

SVN Linux server-side configuration

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.