Three scenarios for upgrading the CentOS 7.4 kernel version

Source: Internet
Author: User
Tags centos

In the experimental environment, the latest CentOS 7.4 operating system has been installed, and the kernel version needs to be upgraded now. Experimental Environment

CentOS Linux release 7.4.1708 (Core)
Kernel 3.10.0-693.el7.x86_64 Scenario One: Minor version upgrade

Connect and synchronize CentOS's own Yum source to update the kernel version. This method is suitable for updating kernel patches.
Specific experimental steps:

sudo yum list kernel
sudo yum update-y kernel

At this point, the installation is successful, but if you want to run the system on a new version of kernel, you will need to restart the operating system.

Reboot complete, kernel version has been upgraded to "3.10.0-693.17.1.el7.x86_64"
Scenario Two: Large version upgrade

Load the Elrepo source, search for the kernel to update the resources, and update the operation.
Specific experimental steps:

# Load Public key
# Install Elrepo
# loading Elrepo-kernel meta data
yum--disablerepo=\*-- Enablerepo=elrepo-kernel repolist
# View available RPM packages
Yum--disablerepo=\*--enablerepo=elrepo-kernel list kernel*
# Install the latest version of kernel
yum--disablerepo=\*--enablerepo=elrepo-kernel install-y kernel-ml.x86_64

Reboot, select the new version kernel to enter the system.

At this point, the kernel used by the operating system has been upgraded to "4.15.0-1.el7.elrepo.x86_64"

The final step is to upgrade the Kernel Toolkit

# Remove old version toolkit
yum Remove kernel-tools-libs.x86_64 kernel-tools.x86_64
# Install new version Toolkit
Yum--disablerepo=\*-- Enablerepo=elrepo-kernel install-y kernel-ml-tools.x86_64

At this point, the upgrade is complete. Scenario Three: self-compiling upgrade

STEP1: Download Source code
STEP2: Installing gcc BC CMake
STEP3: Compile the source code, install the new kernel
The self-compiled upgrade process is slightly complex and not easy to maintain later, and the steps are omitted from this table. Topic Extensions

How to set the newly installed kernel as the default kernel for the operating system, or how to set the new version of the kernel to the default kernel after reboot.
It takes only two steps and then restarts.

Grub2-set-default 0
Terminology Analysis

The ML in KERNEL-ML is the abbreviation for "mainline stable" in English, and the latest stable mainline version is listed in Elrepo-kernel.

The LT in Kernel-lt is the abbreviation for "Long term support" in English, and the long supported version listed in Elrepo-kernel. Reference

[1] The ELRepo Project
[2] Original

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.