Kernel 5 on CentOS 7 — Very Fast Kernel Linux

ERNEL UPDATE ON CENTOS TO THE LATEST VERSION

For IPv6

rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://mirror.imt-systems.com/elrepo/archive/kernel/el7/x86_64/RPMS/elrepo-release-7.0-3.el7.elrepo.noarch.rpm
yum --enablerepo=elrepo-kernel install kernel-ml kernel-ml-devel -y
grub2-set-default 'CentOS Linux (5.1.3-1.el7.elrepo.x86_64) 7 (Core)'
grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-editenv list

List of commands for quick update:

rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://elrepo.org/linux/kernel/el7/x86_64/RPMS/elrepo-release-7.0-3.el7.elrepo.noarch.rpm
yum --enablerepo=elrepo-kernel install kernel-ml kernel-ml-devel -y
grub2-set-default 'CentOS Linux (5.1.2-1.el7.elrepo.x86_64) 7 (Core)'
grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-editenv list
 
yum install yum-utils
package-cleanup --oldkernels --count=2
 
nano /etc/yum.conf
##add
 
exclude=kernel.x86_64
 
# tuned on virual server
tuned-adm profile virtual-guest
tuned-adm active
===
 
modprobe tcp_bbr 
echo  "tcp_bbr" | sudo tee -a /etc/modules-load.d/modules.conf
echo  "net.core.default_qdisc = fq"   | sudo tee -a /etc/sysctl.conf 
echo  "net.ipv4.tcp_congestion_control = bbr" | sudo tee -a /etc/sysctl.conf 
echo  "# allow testing with buffers up to 64MB
net.core.rmem_max = 67108864
net.core.wmem_max = 67108864
# increase Linux autotuning TCP buffer limit to 32MB
net.ipv4.tcp_rmem = 4096 87380 33554432
net.ipv4.tcp_wmem = 4096 65536 33554432
# recommended default congestion control is htcp
net.ipv4.tcp_congestion_control=htcp
# recommended for hosts with jumbo frames enabled
net.ipv4.tcp_mtu_probing=1
# recommended for CentOS7/Debian8 hosts
net.core.default_qdisc = fq " | sudo tee -a /etc/sysctl.conf 
sysctl -p
 
==
check
-
sysctl net.ipv4.tcp_available_congestion_control
sysctl net.ipv4.tcp_congestion_control
 
==
yum --enablerepo=elrepo-kernel install kernel-ml kernel-ml-devel kernel-ml-headers -y

In this post, we will review the kernel update on CentOS 6.7 to the latest version.

Step 1. Add repository to the system

Import key

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

Add a repository for CentOS 7

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

Adding a repository for CentOS 6  (Attention, you need to upgrade your system using the yum upgrade command before installing the kernel)

rpm -Uvh http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm

Step 2. Install the plugin yum-plugin-fastestmirror

yum install yum-plugin-fastestmirror

Step 3. Check the current kernel version

uname -r
kernel update on CentOS

The result for CentOS 7

Step 4. Install the latest kernel version available in the repository.

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

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

grub2-mkconfig -o /boot/grub2/grub.cfg

The kernel-ml package is the current stable release of the kernel.

kernel installation on CentOS

As you can see from the screen, we installed the latest version of the CentOS kernel (At the moment it is version 4.6)

Overload the system

reboot

Step 5. Selecting the kernel version when the system boots.

Choosing a CentOS kernel when booting the system

When booting the system we will see the installed kernel

Step 6. Checking the CentOS kernel version as well as options

net.ipv6.ip_nonlocal_bind
Check CentOS kernel version

PS To start the server with the new kernel 4.6, you need to make changes to the grub2 bootloader with the command

grub2-set-default 0

in this case, the first in the list will be launched by default. 
To view the default download item, you can use the command

grub2-editenv list

Leave a Reply

Your email address will not be published. Required fields are marked *