centos6.8 更新yum源
程序员文章站
2022-05-29 10:02:03
...
1. 进入/etc/yum.repo.d/目录下
cd /etc/yum.repo.d/
2. 备份CentOS-Media.repo
mv CentOS-Media.repo{,.bak}
3.curl下载repo文件
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
或者
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
4. 生成缓存
yum makecache