安装配置Web服务
1 | yum install httpd |
安装rsync
1 | yum install rsync |
常用yum源收集
CentOS
- http://www.centos.org/download/mirrors/
- rsync://mirrors.yun-idc.com/centos/
EPEL
- https://admin.fedoraproject.org/mirrormanager/mirrors
- rsync://dl.fedoraproject.org/fedora-epel
RepoForge
- http://repoforge.org/faq/
- http://mirror-status.repoforge.org
- rsync://ftp.riken.jp/repoforge/
MariaDB
- https://mariadb.com/kb/en/mariadb/mirroring-mariadb/
- rsync.osuosl.org::mariadb
Percona
- https://www.percona.com/blog/2014/02/14/using-percona-rsync-repositories-set-local-centos-mirror/
- rsync://rsync.percona.com/rsync/
自动同步脚本
1 | mkdir /home/_mirrors/centos |
剔除不需要同步的内容
1 | vi /home/_mirrors/centos_exclude.list |
配置自动执行任务
- 每8小时同步一次镜像,使用flock确保任务不会被重复执行
1 | echo PATH=$PATH |
配置YUM源
1 | vi /etc/yum.repos.d/*.repo |