CentOS 8 升级内核教程

CentOS 8 默认的内核是 4.18.x 了,查看了一下,默认好像就开启了 BBR 拥塞控制算法。如果要体验新功能,我们还是得升级到最新的内核,下面是 CentOS 8 升级新内核的办法:

centos 默认内核

安装 ELRepo 源并启用 ELRepo 源仓库:

rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh https://www.elrepo.org/elrepo-release-8.0-2.el8.elrepo.noarch.rpm
yum --disablerepo="*" --enablerepo="elrepo-kernel" list available

安装新内核:

yum -y --enablerepo=elrepo-kernel install kernel-ml kernel-ml-devel

查看默认启动内核:

dnf install grubby
grubby --default-kernel

正常情况下,会显示安装的最新的内核,但是此时如果用 uname -r 显示还不是最新的,重启一下即可。

centos 8 grubby

如果默认的启动内核不是最新的内核,可以使用 grubby --info=ALL 查看所有内核,然后自己指定一个,比如现在最新的内核是 5.5.6-2.el8.elrepo.x86_64,我们可以手工指定:

grubby --set-default /boot/vmlinuz-5.5.6-2.el8.elrepo.x86_64

重启,CentOS 8 升级内核完毕。

发表回复

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>