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)