Automatically update the WebServer hook program after submitting svn under redhat5

Source: Internet
Author: User
1. install svn and configuration can be referenced separately, you can consider http://www.joyphper.net/article/201206/

1. install svn and configure them for reference.
Http://www.joyphper.net/article/201206/linux-svn-install.html

Http://www.joyphper.net/article/201204/148.html

2. create an svn version Library
Svnadmin create/usr/svn/data

3. set the svn account to exist (admin = admin account) and check out the project through checkout
/Usr/svn/bin/svn checkout svn: // 127.0.0.1/test/usr/apache2/htdocs/test -- username = admin -- password = admin

4. configure the post-commit script
Rename/usr/svn/data/hooks/post-commit.tmpl copy to post-commit and set it to executable
Cp/usr/svn/data/hooks/post-commit.tmpl/usr/svn/data/hooks/post-commit
Vi/usr/svn/data/hooks/post-commit
Add at last
/Usr/svn/bin/svn update/usr/apache2/htdocs/test -- username = admin -- password = admin
Save and exit

All the configurations have been completed and the test is submitted locally. if the code is not updated to the web server, the possible reasons are as follows:
1. the user running svn does not have the post-commit execution permission (solution: chmod-R 777/usr/svn/data/hooks/post-commit)
2. the user running svn does not have the read permission for/usr/svn/data (solution: chmod-R 777/usr/svn/data)
3. the user running svn does not have the read permission for/usr/apache2/htdocs and sub-directories (solution: chmod-R 777/usr/apache2/htdocs)

 

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.