yum -y update可以升级服务器,但是服务器内核升级可能会导致部分软件不兼容。
先查看版本-bash-4.2$ cat /etc/redhat-release CentOS Linux release 7.6.1810 (Core)
在 /etc/yum.conf 的 [main] 后面添加以下配置即可不升级内核!
vi /etc/yum.conf
添加
exclude=kernel* exclude=centos-release*
更新服务器
yum update