Install SVN and configure through yum in centos

Source: Internet
Author: User
Tags svn update
 

1. Environment
Centos5.5

2. Install SVN
Yum-y install Subversion

3. Configuration

Create a version library directory
Mkdir/www/svndata

Svnserve-d-r/www/svndata

4. Create a version Library

Create a new subversion Project
Svnadmin create/www/svndata/oplinux

Configure to allow 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 before the modified file; otherwise, an error occurred while starting the svn server.

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

5. Client Connection
SVN Co SVN: // ip/oplinux
Password: 123456

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

6. To synchronize SVN and web, you can co it or directly configure it in the repository.

1) set the root directory of the Web server to/www/webroot.

2) checkout SVN

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

Modify permissions to Web users

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

3) create a synchronization script

CD/www/svndata/oplinux/hooks/

Cppost-commit.tmpl post-commit

Edit post-commit and add the following content 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

Add script execution permission

Chmod + X Post-commit

Install SVN and configure through yum in 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.