CentOS7 换源与禁用
Could not retrieve mirrorlist http://mirrorlist.centos.org?arch=x86_64&release=7&repo=sclo-rh error was 14: HTTP Error 502 - Bad Gateway
CentOS7 官方已经停止维护,需要替换到默认源
https://www.cnblogs.com/kohler21/p/18331060
方法
sudo bash
cd /etc/yum.repos.d/
mv CentOS-Base.repo CentOS-Base.repo_bak
wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
grep -r "http://mirrorlist.centos.org?a" ./ 查找所有可能存在的默认源
打开,修改 enable = 0,或者删除
yum repolist all 查看信息
yun clean all
然后安装所需文件
可以运行
rpm -qa | grep XXXX
查看安装状态
本博文本意在于记录个人的思考与经验,部分博文采用英语写作,可能影响可读性,请见谅
本文来自博客园,作者:ZXYFrank,转载请注明原文链接:https://www.cnblogs.com/zxyfrank/p/18659709