CentOS7 修改 yum 源
- 安装 wget
yum install -y wget
- 备份原始配置
mv CentOS-Base.repo CentOS-Base.repo.bak
- 下载新的 yum 源
wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
- 安装 epel 源
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
- 清理缓存
yum clean all
- 重新生成缓存
yum makecache fast
本作品采用《CC 协议》,转载必须注明作者和本文链接
推荐文章: