1.安装subversion:
yum install subversion
2.创建仓库:
cd /opt mkdir svnRepo chmod -R 777 svnRepo cd svnRepo svnadmin create test cd test/conf
3.修改配置文件:
注意:必须配置全局权限,否则会checkou失败
4.设置自启动 /etc/rc.local:
注意:1.单个仓库启动时可checkout时不能加仓库名,多个仓库必须加仓库名。2.ip访问时服务器开启3690端口
单个仓库启动:svnserve -d -r /opt/svnRepo/test
5.自动更新同步:
cd /app/deploy/www svn checkout svn://ip:3690/test cd /opt/svnRepo/test/hooks/ cp post-commit.tmpl post-commit chmod 755 post-commit
post-commit: