一、备份原yum源
[[email protected] ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.$(date +%F).bak
二、下载对应版本yum源
网易163yum源
Centos链接:http://mirrors.163.com/.help/centos.html
全系统链接:http://mirrors.163.com/.help
[[email protected] ~]# cd /etc/yum.repos.d/ [[email protected] yum.repos.d]# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
三、运行以下命令生成缓存
[[email protected] yum.repos.d]# yum clean all [[email protected] yum.repos.d]# yum makecache
四、更新
[[email protected] yum.repos.d]# yum -y update
时间: 2024-11-06 05:44:13