目前centos系统已经停止维护了,所以官方的yum源已经失效了,目前想要正常使用的话需要,需要将官方的yum源切换为阿里云或腾讯云。所以特在此记录一下更换方法。
#备份官方yum源信息
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
#下载阿里云的yum源并重命名为CentOS-Base.repo
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
#清除yum缓存
yum clean all
#重建yum缓存
yum makecache
Comments NOTHING