CentOS7.X通过更新最新版本内核,解决BBR内核导致的无法编译安装

最近折腾谷歌BBR加速,安装BBR内核后、导致NGINX等软件无法编译安装……全网所有的教程解决方案都试了一遍,无效!什么依赖该装装、该升级升级,没用!最后自己突然想到把内核更新下试试,结果就OK了。写份“CentOS7.X更新最新版本内核「RPM直接安装内核」”,帮助很多遇到同样问题,却找不到解决办法的小伙伴(毕竟生产环境比额外加速啥的更重要啊)。

CentOS7.× 最新内核下载地址:

https://elrepo.org/linux/kernel/el7/x86_64/RPMS/

内核选择:

kernel-lt(lt=long-term)长期有效

kernel-ml(ml=mainline)主流版本

安装过程:

1.下载内核

wget https://elrepo.org/linux/kernel/el7/x86_64/RPMS/kernel-ml-5.5.9-1.el7.elrepo.x86_64.rpm

2.安装内核

rpm kernel-ml-5.5.9-1.el7.elrepo.x86_64.rpm

3.查看当前默认内核

grub2-editenv list

4.查看所有内核启动 grub2

awk -F \’ ‘$1==”menuentry ” {print i++ ” : ” $2}’ /etc/grub2.cfg

5.修改为最新的内核启动

grub2-set-default ‘CentOS Linux (5.5.9-1.el7.elrepo.x86_64) 7 (Core)’

6.再次查看确认内核

grub2-editenv list

7.重新启动

reboot

8.更新kernel-ml-headers

wget https://elrepo.org/linux/kernel/el7/x86_64/RPMS/kernel-ml-headers-5.5.9-1.el7.elrepo.x86_64.rpm

rpm -ivh kernel-ml-headers-5.5.9-1.el7.elrepo.x86_64.rpm

9.更新kernel-ml-devel

wget https://elrepo.org/linux/kernel/el7/x86_64/RPMS/kernel-ml-devel-5.5.9-1.el7.elrepo.x86_64.rpm

rpm -ivh kernel-ml-devel-5.5.9-1.el7.elrepo.x86_64.rpm

Ps:补充-旧版本内核的卸载方法:

查看正在使用的内核

uname -a

查看系统中的全部内核

rpm -qa | grep kernel

卸载多余内核

yum remove kernel-x.xx.x

相关问题报错代码:

configure: error: in `/root/pure-ftpd-1.0.49': configure: error: C preprocessor "/lib/cpp" fails sanity check See `config.log' for more details make: *** No targets specified and no makefile found. Stop.


checking for uint32_t ... uint32_t not found, u_int32_t not found ./configure: error: can not define uint32_t make: *** No rule to make target `build', needed by `default'. Stop. make: *** No rule to make target `install'. Stop.


gmake: *** [default] Error 2 ERROR: failed to run command: gmake TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-DLUAJIT_ENABLE_LUA52COMPAT -msse4.2' CC=cc PREFIX=/www/server/nginx/luajit make: *** No targets specified and no makefile found. Stop. make: *** No rule to make target `install'. Stop.

转载请注明本文链接:http://centos.doc.weixiaoline.com/63.html

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注