使用的是rsync,centos默认就有这个,都不需要安装了
命令:
rsync -av rsync://192.16.11.111:8174/webfiles /home/wwwroot/default chown -R www:www /home/wwwroot/default/*
同步文件后,修改用户组,保存成cron_www.sh
然后把文件属性改一下:
chmode +x cron_www.sh
然后创建定时任务,1分钟同步一下,执行crontab -e
输入:
* * * * * sh /home/a.sh
好了,可以了。