Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Centos7 installs a high-version kernel

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Because of some debugging and testing needs, our centos needs to install a high version of the kernel for real-time debugging of BCC and BPF.

Here is my installation process:

View the current OS version

Cat / etc/centos-release

CentOS Linux release 7.6.1810 (Core)

Install elrepo

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

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

List elrepo-kernel-related software packages

[root@localhost / root] # yum-disablerepo= "*"-enablerepo= "elrepo-kernel" list available

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

* elrepo-kernel: mirrors.tuna.tsinghua.edu.cn

Available Packages

Elrepo-release.noarch 7. 0-4.el7.elrepo elrepo-kernel

Kernel-lt.x86_64 4.4.212-1.el7.elrepo elrepo-kernel

Kernel-lt-devel.x86_64 4.4.212-1.el7.elrepo elrepo-kernel

Kernel-lt-doc.noarch 4.4.212-1.el7.elrepo elrepo-kernel

Kernel-lt-headers.x86_64 4.4.212-1.el7.elrepo elrepo-kernel

Kernel-lt-tools.x86_64 4.4.212-1.el7.elrepo elrepo-kernel

Kernel-lt-tools-libs.x86_64 4.4.212-1.el7.elrepo elrepo-kernel

Kernel-lt-tools-libs-devel.x86_64 4.4.212-1.el7.elrepo elrepo-kernel

Kernel-ml-doc.noarch 5.5.0-1.el7.elrepo elrepo-kernel

Kernel-ml-headers.x86_64 5.5.0-1.el7.elrepo elrepo-kernel

Kernel-ml-tools.x86_64 5.5.0-1.el7.elrepo elrepo-kernel

Kernel-ml-tools-libs.x86_64 5.5.0-1.el7.elrepo elrepo-kernel

Kernel-ml-tools-libs-devel.x86_64 5.5.0-1.el7.elrepo elrepo-kernel

Perf.x86_64 5.5.0-1.el7.elrepo elrepo-kernel

Python-perf.x86_64 5.5.0-1.el7.elrepo elrepo-kernel

Install the related kernel packages:

Yum-enablerepo=elrepo-kernel install kernel-ml kernel-ml-devel.x86_64

View the current kernel version

[root@localhost / root] # sudo awk-F\'$1mm = "menuentry" {print iTunes + ":" $2}'/ etc/grub2.cfg

0: CentOS Linux (5.5.0-1.el7.elrepo.x86_64) 7 (Core)

1: CentOS Linux (3.10.0-957.27.2.el7.x86_64) 7 (Core)

2: CentOS Linux (3.10.0-862.11.6.el7.x86_64) 7 (Core)

3: CentOS Linux (3.10.0-862.el7.x86_64) 7 (Core)

4: CentOS Linux (0-rescue-81b73827307a43799b9968e81edddb2f) 7 (Core)

Set 5.5.0 kernel as the default startup item

Grub2-set-default 0

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

Restart the system

Reboot

Check again

[root@localhost / root] # uname-r

5.5.0-1.el7.elrepo.x86_64

[root@localhost / root] # uname-a

Linux localhost 5.5.0-1.el7.elrepo.x86_64 # 1 SMP Sun Jan 26 20:12:30 EST 2020 x86 "64 GNU/Linux

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report