rpm -q subversion subversion-1.6.11-10.el5_8 如果不存在就用 yum install subversion 安裝
su - root cd /var/www/svn svnadmin create servercfg chown -R apache:apache servercfg
su - root cd /root/ svn co https://xxx.xxxxxx.com/repos/servercfg/nw1
cp /opt/trysrvtool/svnsysfile.conf.default /opt/trysrvtool/svnsysfile.conf vi /opt/trysrvtool/svnsysfile.conf
# 13:54 2012/8/30 # Jonathan Tsai # Ver 1.00 # # defined svn control system config file list (CentOS) # /etc/aliases /etc/crontab /etc/exports /etc/fstab /etc/group /etc/hosts /etc/issue /etc/logrotate.conf /etc/modprobe.conf /etc/nsswitch.conf /etc/ntp.conf /etc/passwd /etc/php.ini /etc/resolv.conf /etc/sensors.conf /etc/services /etc/shadow /etc/smartd.conf /etc/sysctl.conf /etc/httpd/conf/httpd.conf /etc/mrtg/mrtg.cfg /etc/snmp/snmpd.conf /etc/ssh/ssh_config /etc/ssh/sshd_config /etc/sysconfig/iptables /etc/sysconfig/network /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth1 /opt/trysrvtool/svnsysfile.conf /etc/rsnapshot.conf
su - root /opt/trysrvtool/svnsysfile.pl
[root@nw1 etc]# /opt/trysrvtool/svnsysfile.pl ----- 路徑: /root/nw1 URL: https://xxxx.xxxxx.com/repos/servercfg/nw1 檔案庫根目錄: https://xxx.xxxxx.com/repos/servercfg 檔案庫 UUID: 335ed183-f80c-0410-b5c4-909659f95a01 修訂版: 22929 節點種類: 目錄 排程: 正常 最後更新作者: svnbot 最後修改修訂版: 22929 最後修改日期: 2012-08-30 11:57:35 +0800 (四, 30 8月 2012) ----- Svn Add Skip [/root/nw1/etc/aliases] : : Svn Add Skip [/root/nw1/etc/rsnapshot.conf] -------------------- Not Found: 0 Skip Files: 30 Add Error: 0 SVN Add OK: 0 --------------------
vi /etc/crontab
# auto svn commit */5 * * * * root /opt/trysrvtool/updsvnfile.pl config-dir /root > /var/tmp/updsvnfile.log 2 * * * * root /opt/trysrvtool/svnsysfile.pl > /var/tmp/svnsysfile.pl