centos7 upgrade and install the latest version of the kernel bcc-tools

centos7 upgrade the latest version of the kernel

Upgrading the system

[root@jikeshijian ~]# yum update -y

Installation ELRepo

[root@jikeshijian ~]# rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
[root@jikeshijian ~]# rpm -Uvh https://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm

Install the new kernel

[root@jikeshijian ~]# yum remove -y kernel-headers kernel-tools kernel-tools-libs
[root@jikeshijian ~]# yum --enablerepo="elrepo-kernel" install -y kernel-ml kernel-ml-devel kernel-ml-headers kernel-ml-tools kernel-ml-tools-libs kernel-ml-tools-libs-devel

Grub restart after updating

[root@jikeshijian ~]# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.2.8-1.el7.elrepo.x86_64
Found initrd image: /boot/initramfs-5.2.8-1.el7.elrepo.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-862.14.4.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-862.14.4.el7.x86_64.img
done

[root@jikeshijian ~]# awk -F\' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2.cfg
0 : CentOS Linux (5.2.8-1.el7.elrepo.x86_64) 7 (Core)
1 : CentOS Linux (3.10.0-862.14.4.el7.x86_64) 7 (Core)

[root@jikeshijian ~]# grub2-set-default 0
[root@jikeshijian ~]# reboot

View the current settings

[root@jikeshijian ~]# grub2-editenv list
saved_entry=0

After the restart confirmation kernel version has been upgraded to the latest version

[root@jikeshijian ~]# uname -r
5.2.8-1.el7.elrepo.x86_64

Installation bcc-tools

Project Address: https://github.com/iovisor/bcc

Note: The 5.0 kernel is installed above bcc-tools tools have bug See:. MemLeak error ON 5.0.10-1.el7.elrepo.x86_64

We recommend upgrading to the kernel between 4.1 to 4.20.13, see: History Versions kernel

Kernel is installed. See also: centos7 kernel upgrade

[root@jikeshijian ~]# yum install -y bcc-tools

Configuring the PATH

[root@jikeshijian ~]# export PATH=$PATH:/usr/share/bcc/tools

Verify successful installation

[root@jikeshijian ~]# cachestat 

Guess you like

Origin www.cnblogs.com/liyongjian5179/p/11344492.html