Upgrading the Kernel on CentOS 7

Linux

Routine operations for upgrading CentOS system kernel. The current version is CentOS 7 to upgrade to 5.0 kernel.

Check the current kernel version

Terminal window
uname -r

Import the key required for elrepo source

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

Install elrepo source

Terminal window
rpm -Uvh https://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm

The above commands may change depending on the centos version. For detailed explanations of steps 2 and 3, you can check the official documentation: http://elrepo.org/tiki/tiki-index.php

Install the latest kernel from yum source

Terminal window
yum -y --enablerepo=elrepo-kernel install kernel-ml-devel kernel-ml

Set system startup sequence

First check the system startup items:

Terminal window
grep menuentry /boot/grub2/grub.cfg

Then modify which version of the kernel is booted by default:

Note: The current version number (2019-03) is the newly installed 5.0 version number. After that, the kernel version number found above shall prevail.

Terminal window
grub2-set-default 'CentOS Linux (5.0.3-1.el7.elrepo.x86_64) 7 (Core)'

Check if it takes effect

Terminal window
grub2-editenv list

Restart

Terminal window
init 6

Turn on bbr

Modify kernel parameters:

Terminal window
echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
Terminal window
echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf

Save to take effect

Terminal window
sysctl -p

Check if it takes effect

Terminal window
lsmod |grep bbr

show

Terminal window
tcp_bbr 20480 1

That’s it