CentOS
1、备份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2、下载新的CentOS-Base.repo 到/etc/yum.repos.d/
CentOS 5
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
或者
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
CentOS 6
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
或者
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
CentOS 7
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyuncs.com/repo/Centos-7.repo
或者
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3、之后运行yum makecache生成缓存
友情提示:
如果您不了解如何配置 Linux 发行版 / 软件的安装源, 您可以通过首页的文件列表中相应源的 Help 链接寻求帮助
同步频率为每天一次,每天凌晨2:00-4:00为镜像的同步时间
若使用阿里云服务器,将源的域名从mirrors.aliyun.com改为mirrors.aliyuncs.com,不占用公网流量。
如果需要下载ISO镜像,请直接使用Chrome、Firefox浏览器下载,勿使用P2P下载工具。
相关链接