Kernel 5 on CentOS 7 — Very Fast Kernel Linux


For IPv6

rpm --import
rpm -Uvh
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
rpm -Uvh
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
# 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
# recommended for hosts with jumbo frames enabled
# recommended for CentOS7/Debian8 hosts
net.core.default_qdisc = fq " | sudo tee -a /etc/sysctl.conf 
sysctl -p
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

Add a repository for CentOS 7

rpm -Uvh

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

rpm -Uvh

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


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

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 *