rsync同步yum源

编写同步脚本


/usr/bin/rsync -avrt --bwlimit=8000 --delete --exclude-from="file_exclude" rsync://mirrors.tuna.tsinghua.edu.cn/centos/ /data/servers/yum/centos/ &>>/data/servers/update_yum_source.log &


执行完同步后,配置Nginx,开80端口,采用http方式
关键的配置项:


root /data/servers/yum;
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;


编写定时同步crond
#rsync yum update
0 0 * * * /data/servers/yum_update.sh &>/dev/null &
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章