Install SVN and configuration via Yum under CentOS

Source: Internet
Author: User
Tags svn update rsync

1. Environment

centos5.5

2. Install SVN
Yum-y Install Subversion

3. Configuration

Build the Repository Directory
Mkdir/www/svndata

Svnserve-d-r/www/svndata

4. Build the Repository

Create a new Subversion project
Svnadmin Create/www/svndata/oplinux

Configuration allows user rsync access
Cd/www/svndata/oplinux/conf

VI svnserve.conf
Anon-access=none
Auth-access=write
password-db=passwd

Note: There must be no space in front of the modified file, otherwise there is an error starting SVN server

VI passwd
[Users]
#< User 1> = < password 1>
#< User 2> = < password 2>
david=123456

5. Client Connection
SVN Co svn://ip/oplinux
User name password: 123456

===============================================================

6. Implement SVN synchronization with the Web, can be a co-or directly in the warehouse

1) Set the Web server root directory to/www/webroot

2) Checkout a copy of SVN

SVN Co svn://localhost/oplinux/www/webroot

Modify permissions for Web users

Chown-r Apache:apache/www/webroot/oplinux

3) Create a synchronization script

cd/www/svndata/oplinux/hooks/

CP Post-commit.tmpl Post-commit

Edit Post-commit, add the following at the end of the file

Export Lang=en_us. UTF-8
Svn=/usr/bin/svn
web=/www/webroot/
$SVN update $WEB –username rsync–password rsync
Chown-r Apache:apache $WEB

Increase script Execution permissions

chmod +x Post-commit

Install SVN and configuration via Yum under CentOS

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.