kernel.sh
331 0
CentOS 升级内核,BBR 内核要求为 4.9
netnr 2018-12-18
uname -r # 查看内核

rpm -import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org # 导入ELRepo仓库的公共密钥

rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm # CentOS 7

dnf install https://www.elrepo.org/elrepo-release-8.el8.elrepo.noarch.rpm # CentOS 8

yum --disablerepo="*" --enablerepo="elrepo-kernel" list available # 查看
yum --enablerepo=elrepo-kernel install kernel-ml.x86_64 kernel-ml-devel.x86_64 # 安装

# 离线包下载 /var/cache/yum 或 /var/cache/dnf/appstream-30f99002f895d3ec/packages/
# https://linux.cc.iitk.ac.in/mirror/centos/elrepo/kernel/el8/x86_64/RPMS/
# https://elrepo.org/tiki/kernel-lt

rpm -qa | grep kernel # 查看系统中全部的内核RPM包

yum remove 内核名称 # 删除旧内核的RPM包

grub2-editenv list # 查看默认启动项

grub2-set-default 0 # 设置以新版本内核启动
grub2-set-default "kernel-3.10.0-229" # 设置默认启动项 
grub2-mkconfig -o /boot/grub2/grub.cfg # 重新创建内核配置

reboot # 重启
登录写评论