MENU

CentOS7更新与清理教程

June 20, 2019 • Read: 225 • Server阅读设置

更新

检查你的CentOS版本

# cat /etc/redhat-release
CentOS Linux release 7.1.1503 (Core)

用yum更新升级

# yum clean all
# yum update

用下面的命令重新启动服务器

# shutdown -r now

确认您的系统已成功升级

# cat /etc/redhat-release
CentOS Linux release 7.4.1611 (Core)

清理

查看系统当前内核版本

# uname -a
Linux localhost.localdomain 3.10.0-693.21.1.el7.x86_64 #1 SMP Wed Mar 7 19:03:37 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

查看系统中全部的内核RPM包

# rpm -qa | grep kernel
kernel-tools-libs-3.10.0-693.21.1.el7.x86_64
abrt-addon-kerneloops-2.1.11-48.el7.centos.x86_64
kernel-3.10.0-693.21.1.el7.x86_64
kernel-tools-3.10.0-693.21.1.el7.x86_64
kernel-3.10.0-693.el7.x86_64

删除旧内核的RPM包,例如

# sudo yum remove kernel-3.10.0-693.el7

重启系统

# shutdown -r now
无标签
最后编辑于: June 24, 2019