配置阿里云的yum源:
1,将/etc/yum/repos.d目录下的 Centos-Base.repo备份
mv /etc/yum/repos.d/Centos-Base.repo /etc/yum/repos.d/Centos-Base.repo.backup
2,下载新的Centos-Base.repo到/etc/yum/repos.dwget -O /etc/yum.repos.d/CentOS-Base.repo
http://mirrors.aliyun.com/repo/Centos-7.repo
3,刷新yum源的缓存
yum makecache
yum repolist //查看配置的存储库
详细信息请参考阿里云的镜像网站:https://opsx.alibaba.com/mirror。找到centos点击帮助,更换yum源
配置阿里云的epel源:
EPEL(Extra Packages for Enterprise Linux)是基于Fredora的一个项目,为“红帽系”的操作系统提供额外的软件包,是基础类的包中的扩展的包,适用于RHEL、CentOS系统,也是yum中必备的一个源。 建议把https 替换为 http,解决速度慢的问题。wget -O /etc/yum.repos.d/epel.repo
http://mirrors.aliyun.com/repo/epel
详细信息请参考阿里云的镜像网站:https://opsx.alibaba.com/mirror。找到epel,点击帮助