文章目录
  1. 1. CentOS 7 Update Kernel in simple way
    1. 1.1. Update system
    2. 1.2. Install kernel
    3. 1.3. Summary

CentOS 7 Update Kernel in simple way

Installing using Elrepo , very simple, just several commands

Update system

yum update -y

Install kernel

rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm

Updating Kernel

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

Enable the new kernel

List the kernels installed

awk -F\' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2.cfg

Output like this

[root@xxxxxx ~]# awk -F\' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2.cfg
0 : CentOS Linux (4.9.9-1.el7.elrepo.x86_64) 7 (Core)
1 : CentOS Linux (3.10.0-327.36.3.el7.x86_64) 7 (Core)
2 : CentOS Linux (3.10.0-229.14.1.el7.x86_64) 7 (Core)
3 : CentOS Linux, with Linux 3.10.0-123.el7.x86_64
4 : CentOS Linux, with Linux 0-rescue-85bb5cde1995553d97a4c43c84fa2726

Set the default kernel

grub2-set-default 0

Restart

reboot

Summary

So easy , right.

文章目录
  1. 1. CentOS 7 Update Kernel in simple way
    1. 1.1. Update system
    2. 1.2. Install kernel
    3. 1.3. Summary