Build a powerful Linux SVN Control System

Source: Internet
Author: User

Linux SVN is a common system, so I learned how to use Linux SVN. Here I will introduce the application of Linux SVN in detail and hope it will be useful to you. Build a powerful Linux SVN version control system in 10 minutes.

Recently, POBO explained to me the Linux SVN version control system. I would like to share with you some information about it. Original: http://www.gaojinbo.com /? P = 32 requirement: Create a linux svn server in Linux and automatically synchronize the server to the WEB directory to instantly modify the WEB content through SVN.

1. Environment
Centos5.3

2. install Linux SVN
Yum-y install subversion

3. Linux SVN Configuration
Create a version library directory
Mkdir/svn
Svnserve-d-r/svn

4. Create a version library for Linux SVN
Create a new Subversion Project
Svnadmin create/svn/www.gaojinbo.com
Configure to allow rsync access
Cd/svn/www.gaojinbo.com/conf

 
 
  1. vi svnserve.conf  
  2. anon-access=none 
  3. auth-access=write 
  4. password-db=passwd 

Note: there must be no space before the modified file; otherwise, an error occurred while starting the svn server.

 
 
  1. Vi passwd
  2. [Users]
  3. #<User 1>=<Password 1> 
  4. #<User 2>=<Password 2> 
  5. RsyncRsync= Rsync

5. Linux SVN Client Connection
Svn co svn: // ip/www.gaojinbo.com
Username and password: rsync

6. implement synchronization between Linux SVN and WEB
1) set the root directory of the WEB server to/www/www.gaojinbo.com.
2) checkout SVN
Svn co svn: // localhost/www.gaojinbo.com/www/www.gaojinbo.com
Modify permissions to WEB users
Chown-R apache: apache/www/www.gaojinbo.com/
3) create a synchronization script
Cd/svn/www.gaojinbo.com/hooks/
Cppost-commit.tmpl post-commit
Edit post-commit and add the following content at the end of the file:

 
 
  1. export LANG=en_US.UTF-8  
  2. SVN=/usr/bin/svn  
  3. WEB=/www/www.gaojinbo.com/  
  4. $SVN update $WEB –username rsync –password rsync  
  5. chown -R apache:apache $WEB 

Add the script execution permission chmod + x post-commit! How far a person can go depends on who he is

  1. Folder to be created for installing Linux SVN
  2. Access Mode for Linux SVN installation and startup
  3. Create a Linux SVN repository file and install and configure it
  4. Linux Oracle 10 Gb software installation database
  5. Folder to be created for installing Linux 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.