The setup and use of SVN

Source: Internet
Author: User
Tags chmod subversion download svn svn update version control system
SVN is a subversion abbreviation, is an open source version control system, compared to RCS, CVS, it uses a branch management system, its design goal is to replace CVS. Many version control services on the Internet have migrated from CVs to subversion.
1. Performance improvement. SVN regardless of whether the file is text or binary type, the internal is a binary diff comparison algorithm to represent the update part of the file. This means that all files are stored in a different form in the file library. and the transmission on the network, is the small file difference part. This also makes branching, tagging, merging, and so on can be done very quickly.
2. The organization of the directory is more convenient to manage. SVN does not only version-track files, but also version-track directories. As a result, the directory structure can be modified at any time according to the needs of the project, and the existing directory can be moved to a new place.

3. Ensure the integrity of the submission operation. SVN handles the commit operation in a manner similar to that of a database transaction, either all successful or all invalid to ensure atomicity.

Start configuration Now

    Mount/dev/cdrom/media/cdrom Mount Optical drive 1. Install SVN server side yum install subversion download installation from mirror SVN server side cd/usr/local///Enter directory, ready to create SVN directory mkdir SVN//Create an S VN Directory Chmod-r 777 SVN//Modify directory permissions for 777 Svnadmin create/usr/local/svn/linux//Create a SVN version of the warehouse sunny (Sunny can casually name) CD svn/linux/conf//Into the sunny version of the warehouse under the configuration file directory to modify this      Directory of three profiles (1) vi svnserve.conf//configuration version library information and user files and user password file path, version library path to anon-access = None Change to none auth-access = Write password-db = passwd r Ealm = Linux//convert to own version Library 30 save (2) vi Authz//file, create SVN group and group user permissions [GR      OUP] Linux = PCY,TRP//Create a sunny group, and specify two users GEP and WCE [/]//Set the permissions under the root directory @linux = RW    Sunny group user rights are read-write
    * = r//Other user only Read permission save exit (3) VI passwd//Create or modify user password [users] pcy = 1    
    23456//user name GEP user's password is 123456 TRP = 123456//... Save exit Start svn:svnserve-d-r/usr/local/svn///Here is a version of the library to start if a single repository can be svnserve-d-r/usr/loc Al/svn/sunny add a row and then set the start Vi/etc/rc.d/rc.local to open the Add from boot file/    
    Usr/bin/svnserve-d-r/usr/local/svn/So far, you can check out files from the service side.    
    SVN command: NETSTAT-TNL |grep:3690 See if svn starts PS aux |grep ' svn ' to find all SVN-initiated processes  Kill-9 2505 kills 2505 The found SVN process is checked out first, set up a folder in the root directory to place the file checked out command: SVN    
    Checkout svn://linux ip/version library name/directory path to checkout example: SVN checkout SVN:// (established directory)/aaa (file directory to check out) If you are creating a new folder, first add the file to SVN add the second part of the new file is to submit the SVN commit-m "annotation" xxx.phP//Submit file [root@localhost aaa]# svn commit-m "aaaaaaaaaaaa" a.php new a.php transfer file data.    
    The revised version after submission is 1.    
    Third two users edited at the same time the third has to edit then get svn up. Remove the latest version of the edit file common commands: SVN up//Update files SVN commit-m "comment" xxx.php//Submit file SVN add filename//new file and add to SVN s    
    VN Add *.php//(Add all PHP files under current directory) SVN delete test.php//delete test.php SVN log test.php//view the log information of the test file svn cleanup//Clean up the current directory ###### ############################# #设置svn自动更新, does not need to be done manually ##################### automatically updated in Vi/usr/loc    
    Add #!/bin/sh #设置一些变量 svn=/usr/bin/svn in Al/svn/sunny/hooks/post-commit web=/you want to update the catalog export Lang=en_us. UTF-8 $SVN Update $WEB--username SVN username--password password svn= to the right of the SVN command position generally defaults to/USR/BIN/SVN web= right to your actual WEB directory Give executable permission chmod 777/usr/local/svn/sunny/hooks/post-commit installed = =    
    ======================================================================= Other operations svn up update SVN switch--relocate svn:// svn:// SVN version Gallery address//SVN version library start mode, now SVN below is sunny, test two version Library 1: Single version library starter svnserve-d-r/usr/local/svn/sunny 2: Multi-version library start SVNS    
    The erve-d-R/USR/LOCAL/SVN differs from the boot parameter-r specified directory in the start SVN command. Restrict different user to different version library operation permissions, modify the Authz file in the Conf directory in the version library to configure the sunny version library as an example VI Authz [groups] Teac           her = Sunny,sunny1 [sunny:/]//Specify permissions under repository and directory @teacher = RW//teacher Group user permissions are read/write * = R Other users only read permission to save Exit VI PASSWD set the user's account and password in the group [users] sunny = 123456 Sunny1 = 123456     

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: 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.