CentOS7 upgrade kernel kernel5.0 version

CentOS7 upgrade kernel kernel5.0 version

Upgrade process:

Original system: CentOS7.3

[root@my-e450 ~]# uname -r
3.10.0-514.el7.x86_64

Install required packages:

# yum update
# yum install -y ncurses-devel make gcc bc bison flex elfutils-libelf-devel openssl-devel grub2

Download the kernel from https://www.kernel.org/;

The kernel version I downloaded here is 5.0.21

Link: https://pan.baidu.com/s/1W1Bc6GYuwgzNG0uW6i2__w

Extraction code: nqhj

Copy the file to the USB drive or upload it to the server and unzip it to the /usr/src/kernels folder.

tar -xvf linux-5.0.21.tar.gz -C /usr/src/kernels/

cd /usr/src/kernels/linux-5.0.21

Copy the original configuration:

cp -v cp /boot/config-3.10.0-514.el7.x86_64 /usr/src/kernels/linux-5.0.21/.config

Configure the kernel:

make menuconfig

You can customize the kernel features here. If you are not familiar with the kernel, just use the tab key to select save and then exit.

Then, run df -h to check the available space on the hard disk and make sure there is 16 GB of free space. The compilation process will use a lot of space.

Well, now it compiles!

[root@my-e450 linux-5.0.21]# nproc

2

nproc View the number of CPU cores

make -j 2 && make modules_install -j 2 && make install -j 2

Here, if there are no more than 4 cores, -j is followed by the number of CPU cores; if there are more than 4 cores, it is recommended to use -j 4, which is more stable.

Go read a book, it will probably take more than an hour.

After compiling, continue to execute:

#grub2-set-default "CentOS Linux (5.0.21) 7 (Cores)"

#grub2-editenv list

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

Restart the system

#reboot

After restarting, the newly compiled kernel will be automatically selected. Enter your username and password to log in to the system.

[root@my-e450 ~]# uname -sr
Linux 5.0.21

Kernel upgrade succeeded~~~

Summarize

The above is the CentOS7 kernel upgrade kernel5.0 version introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • How to upgrade CentOS7 to CentOS8 (detailed steps)
  • Tutorial on upgrading from Centos7 to Centos8 (with pictures and text)
  • How to upgrade CentOS/RHEL minimal installation through yum
  • Linux system Centos7.4 manual online upgrade to Centos7.7

<<:  Detailed installation process of nodejs management tool nvm

>>:  Mysql view the maximum number of connections and modify the maximum number of connections

Recommend

Simple steps to create a MySQL container with Docker

Preface We have already installed Docker and have...

How to set the width and height of html table cells

When making web pages, you often encounter the pr...

Some tips for using less in Vue projects

Table of contents Preface 1. Style penetration 1....

Design Story: The Security Guard Who Can't Remember License Plates

<br />In order to manage the vehicles enteri...

CentOS 7.x docker uses overlay2 storage method

Edit /etc/docker/daemon.json and add the followin...

Study notes to write the first program of Vue

Table of contents 1. Write an HTML, the first Vue...

How to get USB scanner data using js

This article shares the specific process of js ob...

Steps to set up HTTPS website based on Nginx

Table of contents Preface: Encryption algorithm: ...

CentOS 7 cannot access the Internet after modifying the network card

Ping www.baidu.com unknown domain name Modify the...

Solution to ONLY_FULL_GROUP_BY error in Mysql5.7 and above

Recently, during the development process, the MyS...

JavaScript Basics Series: Functions and Methods

Table of contents 1. The difference between funct...

Install Apache2.4+PHP7.0+MySQL5.7.16 on macOS Sierra

Although Mac systems come with PHP and Apache, so...