后来找到原因尴尬了这台服务器同事以前安装插件时候把CentOS-Epel.repo 设置成enabled=0以后就没改回来。
yum update 不更新内核只更软件以下两个办法:
1.
yum –exclude=kernel* update
2.
vim /etc/yum.conf
[main]
最后面添加
exclude=kernel*
exclude=centos-release*
更新repo源:
1.cd /etc/yum.repos.d/
2.mv CentOS-Base.repo CentOS-Base.repo.bak
3.
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
或者
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
mv Centos-7.repo CentOS-Base.repo
yum clean all
yum makecache
原文:http://blog.51cto.com/xpu2001/2140317