Install, configure, and use the version management tool SVN

Source: Internet
Author: User
Tags svn update
SVN (subversion) Details

 

SVN is an excellent version management tool in recent years. Like CSV management tools, SVN is a cross-platform open-source version control system, but what is different from SVN is that, SVN backs up and records every modification and update change to each file. In this way, we can restore the files at any time point to an old version. Of course, we can also directly browse the update history of the specified file.

 

  • SVN Service Construction

    # Yum install subversion-y # svnserve -- version // view the version

     

  • Create a repository directory Repo

    # Mkdir-P/opt/SVN/repo // create a directory # svnadmin create/opt/SVN/repo // create a new repository # ls! $ // View the last used path


     

  • Adjust SVN Parameters
    # Vim/opt/SVN/repo/CONF/svnserve. conf // note: there cannot be spaces and comments before the downstream configuration item anon-access = NONE // anonymous users do not have any permissions auth-access = write // Authenticated Users have Write Permissions Password-DB =/OPT /SVN/repo/CONF/passwd // User Password File authz-DB =/opt/SVN/repo/CONF/authz // user information file

     

  • ** Start and close the svn Service
    # Svnserve-d-r/opt/SVN/repo // disable the kill PID or pkill svnserve # netstat-tunlp | grep svnserve


     

  • Create an account for a PHP programmer
    # Vim/opt/SVN/repo/CONF/passwd // create account password [users] zhangsan = abc123sysadmin = ABC123 # Vim/opt/SVN/repo/CONF/authz // create permission file [/] // write account and permission under the root directory (r read w write) zhangsan = rsysadmin = RW [/webphp] SysAdmin = rzhangsan = RW # mkdir/opt/SVN/repo/webphp # SVN import webphp/file: /// opt/SVN/repo/webphp-M "initialize SVN directory" // import webphp

     

Basic operation instructions:

 
1. Check out
After the file is obtained, the detected file is still under SVN version control and associated with the version library. For example, you can perform SVN update or SVN commit operations. At the same time, the exported folder contains a hidden. SVN folder that stores metadata of some versions. (For data imported to the server, you must check out the data to form a working copy controlled by SVN before you can perform operations such as add update commit)
 
2. Export
Export data of a single version (exporting data from the server is equivalent to copying one copy). The exported file is out of SVN version control (the exported file is a file, it does not matter with the SVN version). After the export, the update and commit operations cannot be performed. The exported Folder does not have the. SVN directory.
 
3. Import
Only import the file to the svn server, and the file itself is only a common file, and it has nothing to do with the SVN version Library (the address of the svn server is required during import, you can copy the version library from the server, and right-click Copy under repositories)
 
4. Add
Add the newly created file to the cache area (a plus sign is displayed after execution). You must submit a commit statement to upload the file to the server (the check mark is displayed)
 
5. Update
Update the latest version on the server, such as the version uploaded by someone else. (update is required before submission. Otherwise, the new version uploaded by someone else will be overwritten if it is not updated, uploaded by others will be lost)

Install, configure, and use the version management tool SVN

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.