CentOS7--manually upgrade the kernel to the specified version

Current environment

System: CentOS Linux release 7.2.1511 (Core)
Kernel: 3.10.0-327.el7.x86_64

Kernel target version: 3.10.0-957.27.2.el7.x86_64

problem

Directly use yum install kernel to install and find that the latest version is 3.10.0-1062 * version.

Solution

Download kernel rpm package

URL: https://buildlogs.centos.org/c7.1810.u.x86_64/kernel/20190729174341/3.10.0-957.27.2.el7.x86_64/
choose to download the following three packages:

  • kernel-3.10.0-957.27.2.el7.x86_64.rpm
  • kernel-headers-3.10.0-957.27.2.el7.x86_64.rpm
  • kernel-devel-3.10.0-957.27.2.el7.x86_64.rpm

Perform the installation

Install the kernel

yum localinstall kernel-3.10.0-957.27.2.el7.x86_64.rpm

At this point you can use the command yum install kernel-devel-$(uname -r) kernel-headers-$(uname -r)to install the header files and dependencies,
if the installation was successful then the following two commands do not execute. If the installation fails, perform the following steps.

yum localinstall kernel-devel-3.10.0-957.27.2.el7.x86_64.rpm
yum localinstall kernel-headers-3.10.0-957.27.2.el7.x86_64.rpm

result

Insert picture description here

Set 957 to start the kernel

grub2-set-default "CentOS Linux (3.10.0-957.27.2.el7.x86_64) 7 (Core)"
Published 134 original articles · Liked 119 · Visit 310,000+

Guess you like

Origin blog.csdn.net/jobbofhe/article/details/105045494