1. 安装rsync命令
yum install rsync
2. 在/home/yum/centos/6/目录下创建rsync.sh文件
touch rsync.sh
3. 将命令复制到rsync.sh文件中r
sync -avz rsync://rsync.mirrors.ustc.edu.cn/epel/6/x86_64/ /home/yum/centos/6/epel
rsync -avz rsync://mirrors.163.com/centos/6/os/x86_64/ /home/yum/centos/6/base
rsync -avz rsync://mirrors.163.com/centos/6/updates/x86_64/ /home/yum/centos/6/updates
rsync -avz rsync://mirrors.163.com/centos/6/extras/x86_64/ /home/yum/centos/6/extras
转载于:https://blog.51cto.com/7180441/2361443