CentOS6.8 build svn and automatically sync to web directory with hooks

Source: Internet
Author: User
Tags svn update

    1. Installing Subversion:yum install-y Subversion

    2. Check if the installation was successful: SVN--version

    3. Create a warehouse directory: Mkdir-p/home/svn/test

    4. Create Project: Svnadmin create/home/svn/test

    5. Check whether the creation was successful:

(1) Cd/home/svn/test

(2) LL #查看生成文件

6.cd/home/svn/test/conf #进入目录有文件 Authz, passwd, svnserve.conf

7.vim Authz #设置用户权限 added in the back

[/]

admin = RW

8.vim passwd #设置用户密码

[User]

admin = 123456

9.vim svnserve.conf #设置去掉注释

Anon-access = Read

auth-access = Write

Password-db = passwd

Authz-db = Authz

Realm =/home/svn/test #写自己的创库

10. Start SVN service: svnserve-d-r/home/svn * Note *: not svnserve-d-r/home/svn/test

11. Install the TORTOISESVN test address locally: SVN://IP address/test Enter the user password

12. Enable automatic synchronization

#例如: Your Web directory is/www/web

(1) Cd/home/svn/test/hooks

(2) CP Post-commit.tmpl Post-commit

(3) Vim post-commit #设置

export LANG=ZH_CN. UTF-8

SVN Co svn://47.92.168.214/test/www/web

Log_path=/tmp/svn_test.log

Web=/www/web

Repos= "$"

rev= "$"

SVN update--username admin--password 123456 $WEB--no-auth-cache >> $LOG _path

Save exit

13.killall Svnserve

14.svnserve-d-R/HOME/SVN #重启服务



CentOS6.8 build svn and automatically sync to web directory with hooks

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.