Before the update, the kernel version was:
uname -r
3.10.0-327.10.1.el7.x86_64
- 1
- 2
How to upgrade:
1. Import key
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
- 1
2. Install the yum source of elrepo
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
- 1
3. Install the kernel
yum --enablerepo=elrepo-kernel install kernel-ml-devel kernel-ml
- 1
Currently 4.4.4:
======================================================================================================================================================
Package 架构 版本 源 大小
======================================================================================================================================================
正在安装:
kernel-ml x86_64 4.4.4-1.el7.elrepo elrepo-kernel 38 M
kernel-ml-devel x86_64 4.4.4-1.el7.elrepo elrepo-kernel 10 M
- 1
- 2
- 3
- 4
- 5
- 6
4. View the default startup sequence
awk -F\' '$1=="menuentry " {print $2}' /etc/grub2.cfg
CentOS Linux (4.4.4-1.el7.elrepo.x86_64) 7 (Core)
CentOS Linux (3.10.0-327.10.1.el7.x86_64) 7 (Core)
CentOS Linux (0-rescue-c52097a1078c403da03b8eddeac5080b) 7 (Core)
- 1
- 2
- 3
- 4
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
- 1
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
- 1
- 2
5. Remove the old kernel
yum remove kernel
https://www.tesun.net/centos7sheng-ji-nei-he/