Linux: Centos7 upgrade kernel

Notice

This article is mainly used to upgrade the kernel before docker installation.
If necessary, please back up important data first

Before the update, the kernel version was:

uname -r
3.10.0-327.10.1.el7.x86_64

How to upgrade:

1. Import key

rpm –import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

2. Install the yum source of elrepo (you can visit ELRepo for the latest version )

rpm -Uvh rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm

3. Install the kernel

yum –enablerepo=elrepo-kernel install kernel-ml-devel kernel-ml

The default boot order starts from 0, and the new kernel is inserted from the beginning (the current position is 0, and 4.4.4 is at 1), so you need to choose 0.

grub2-set-default 0

Then reboot, use the new kernel, the following is the kernel version used after reboot:

uname -r
4.4.4-1.el7.elrepo.x86_64

4. Remove the old kernel

yum remove kernel

Reference: https://blog.csdn.net/silentwolfyh/article/details/52047780

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324424080&siteId=291194637