编写同步脚本
/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 &
/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 &