Under CentOS installation and configuration via svn yum

1. the environment
2. install SVN
yum -y install subversion
3. configure
Set up repository directories
mkdir /www/svndata
svnserve -d -r /www/svndata
4. set up the repository
Create a new Subversion project
svnadmin create /www/svndata/oplinux
Configuration allows the user to rsync access
cd /www/svndata/oplinux/conf
vi svnserve.conf
Note: modified file must not be a space in front, otherwise start the SVN server error
vi passwd
#< User 1> = < password 1 >
#< User 2> = < password 2 >
5. client connections
svn co svn://ip/oplinux
User name password: 123456
6. implement WEB and SVN synchronization, CO a, you can also directly in the warehouse
1) set the WEB server root directory to/www/Webroot
2) checkout SVN
svn co svn://localhost/oplinux /www/webroot
Modify permissions for WEB users
chown -R apache:apache /www/webroot/oplinux
3) synchronization script
cd /www/svndata/oplinux/hooks/
cp post-commit.tmpl post-commit
Edit the post-commit, finally add the following contents of a file
export LANG=en_US. UTF-8
$SVN update $WEB –username rsync –password rsync
chown -R apache:apache $WEB
Add script execute permissions
chmod +x post-commit