Centos将本地Yum源改成国内阿里源
1.下载新的CentOS-Base.repo 到/etc/yum.repos.d/
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
2.mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
3.之后运行yum makecache生成缓存
yum clean all
yum makecache
如果当中出现这样的错误。大部分都是CentOS-Base.repo 出错
正确的是这一个:链接:https://pan.baidu.com/s/1Z7wRXsX9PghK6NsifkAaZg 密码:g4ph
如果出现以下问题:
有效方法:命令如下
yum --disablerepo=epel -y update ca-certificates