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

Detailed explanation of using Nginx reverse proxy to solve cross-domain problems

question In the previous article about cross-doma...

MySQL installation tutorial under Windows with pictures and text

MySQL installation instructions MySQL is a relati...

Javascript scope and closure details

Table of contents 1. Scope 2. Scope Chain 3. Lexi...

A brief analysis of React's understanding of state

How to define complex components (class component...

Introduction to JavaScript Number and Math Objects

Table of contents 1. Number in JavaScript 2. Math...

Summary of some common techniques in front-end development

1. How to display the date on the right in the art...

CSS isolation issue in Blazor

1. Environment VS 2019 16.9.0 Preview 1.0 .NET SD...

How to install grafana and add influxdb monitoring under Linux

Install grafana. The official website provides an...

In-depth understanding of MySQL master-slave replication thread state transition

Preface The basic principle of MySQL master-slave...

Detailed explanation of CSS3 flex box automatic filling writing

This article mainly introduces the detailed expla...

JavaScript immediate execution function usage analysis

We know that in general, a function must be calle...