首页
友链
壁纸
直播
留言
归档
关于
推荐
百度一下
腾讯视频
Search
1
linux免费WEB管理面板:AMH
16,497 阅读
2
为主题添加前台删除文章及评论功能
5,072 阅读
3
欢迎使用Typecho
3,886 阅读
4
创建WordPress多站点网络
2,591 阅读
5
代码高亮 - SyntaxHighlighter 0.0.5
1,875 阅读
网络杂记
Wordpress
Typecho
VPS教程
主题模板
登录
Search
标签搜索
Typecho
WordPress
主题
Linux
VPS
LNMP
MySQL
管理面板
nginx
面板
升级
Apache
php函数
缓存
gravatar
404错误
评论
删除
命令
kloxo
CludeChn
累计撰写
119
篇文章
累计收到
13
条评论
首页
栏目
网络杂记
Wordpress
Typecho
VPS教程
主题模板
页面
友链
壁纸
直播
留言
归档
关于
推荐
百度一下
腾讯视频
搜索到
1
篇与
的结果
2023-03-05
Linux内核升级
查看当前内核版本使用uname命令查看内核版本,其中-a选项输出信息更为详细。# uname -a Linux ibetterlife 5.14.0-162.18.1.el9_1.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Mar 1 22:02:24 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux # uname -r 5.14.0-162.18.1.el9_1.x86_64启用 ELRepoELRepo是企业Linux软件包的RPM存储库。ELRepo支持Red Hat Enterprise Linux (RHEL) 及其衍生产品,如Scientific Linux、CentOS Linux、Alma Linux 和 Rocky Linux。ELRepo项目专注于与硬件相关的软件包,以增强您对Enterprise Linux 的体验。这包括文件系统驱动程序、图形驱动程序、网络驱动程序、声音驱动程序、网络摄像头和视频驱动程序。从CentOS/AlmaLinux/RockLinux 8开始,ELRepo已经加入到官方软件仓库中,名称为 “elrepo-release”。启用ELRepo只需要执行命令:dnf -y install elrepo-release安装ELRepo公钥rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.orgELRepo rpm包在线安装方法# Import the public key: rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org # To install ELRepo for RHEL-**9** or CentOS-**9**: yum install https://www.elrepo.org/elrepo-release-9.el9.elrepo.noarch.rpm # To install ELRepo for RHEL-**8** or CentOS-**8**: yum install https://www.elrepo.org/elrepo-release-8.el8.elrepo.noarch.rpm # To install ELRepo for RHEL-**7**, SL-**7** or CentOS-**7**: yum install https://www.elrepo.org/elrepo-release-7.el7.elrepo.noarch.rpm # To make use of our mirror system, **please also install yum-plugin-fastestmirror**.升级内核查询ELRepo中的kernel版本# yum --disablerepo="*" --enablerepo="elrepo-kernel" list available Last metadata expiration check: 0:21:04 ago on Wed 22 Mar 2023 04:10:15 PM CST. Available Packages bpftool.x86_64 6.2.7-1.el9.elrepo elrepo-kernel kernel-ml.x86_64 6.2.7-1.el9.elrepo elrepo-kernel kernel-ml-core.x86_64 6.2.7-1.el9.elrepo elrepo-kernel kernel-ml-devel.x86_64 6.2.7-1.el9.elrepo elrepo-kernel kernel-ml-devel-matched.x86_64 6.2.7-1.el9.elrepo elrepo-kernel kernel-ml-doc.noarch 6.2.7-1.el9.elrepo elrepo-kernel kernel-ml-headers.x86_64 6.2.7-1.el9.elrepo elrepo-kernel kernel-ml-modules.x86_64 6.2.7-1.el9.elrepo elrepo-kernel kernel-ml-modules-extra.x86_64 6.2.7-1.el9.elrepo elrepo-kernel kernel-ml-tools.x86_64 6.2.7-1.el9.elrepo elrepo-kernel kernel-ml-tools-libs.x86_64 6.2.7-1.el9.elrepo elrepo-kernel kernel-ml-tools-libs-devel.x86_64 6.2.7-1.el9.elrepo elrepo-kernel perf.x86_64 6.2.7-1.el9.elrepo elrepo-kernel python3-perf.x86_64 6.2.7-1.el9.elrepo elrepo-kernel # yum --disablerepo="*" --enablerepo="elrepo-kernel" list available --showduplicates Last metadata expiration check: 0:44:46 ago on Wed 22 Mar 2023 04:10:15 PM CST. Available Packages bpftool.x86_64 6.2.6-1.el9.elrepo elrepo-kernel bpftool.x86_64 6.2.7-1.el9.elrepo elrepo-kernel elrepo-release.noarch 9.1-1.el9.elrepo elrepo-kernel kernel-ml.x86_64 6.2.6-1.el9.elrepo elrepo-kernel kernel-ml.x86_64 6.2.7-1.el9.elrepo elrepo-kernel kernel-ml-core.x86_64 6.2.6-1.el9.elrepo elrepo-kernel kernel-ml-core.x86_64 6.2.7-1.el9.elrepo elrepo-kernel kernel-ml-devel.x86_64 6.2.6-1.el9.elrepo elrepo-kernel kernel-ml-devel.x86_64 6.2.7-1.el9.elrepo elrepo-kernel kernel-ml-devel-matched.x86_64 6.2.6-1.el9.elrepo elrepo-kernel kernel-ml-devel-matched.x86_64 6.2.7-1.el9.elrepo elrepo-kernel kernel-ml-doc.noarch 6.2.6-1.el9.elrepo elrepo-kernel kernel-ml-doc.noarch 6.2.7-1.el9.elrepo elrepo-kernel kernel-ml-headers.x86_64 6.2.6-1.el9.elrepo elrepo-kernel kernel-ml-headers.x86_64 6.2.7-1.el9.elrepo elrepo-kernel kernel-ml-modules.x86_64 6.2.6-1.el9.elrepo elrepo-kernel kernel-ml-modules.x86_64 6.2.7-1.el9.elrepo elrepo-kernel kernel-ml-modules-extra.x86_64 6.2.6-1.el9.elrepo elrepo-kernel kernel-ml-modules-extra.x86_64 6.2.7-1.el9.elrepo elrepo-kernel kernel-ml-tools.x86_64 6.2.6-1.el9.elrepo elrepo-kernel kernel-ml-tools.x86_64 6.2.7-1.el9.elrepo elrepo-kernel kernel-ml-tools-libs.x86_64 6.2.6-1.el9.elrepo elrepo-kernel kernel-ml-tools-libs.x86_64 6.2.7-1.el9.elrepo elrepo-kernel kernel-ml-tools-libs-devel.x86_64 6.2.6-1.el9.elrepo elrepo-kernel kernel-ml-tools-libs-devel.x86_64 6.2.7-1.el9.elrepo elrepo-kernel perf.x86_64 6.2.6-1.el9.elrepo elrepo-kernel perf.x86_64 6.2.7-1.el9.elrepo elrepo-kernel python3-perf.x86_64 6.2.6-1.el9.elrepo elrepo-kernel python3-perf.x86_64 6.2.7-1.el9.elrepo elrepo-kernel术语解释 kernel-ml kernel-ml中的ml是英文 “mainline stable” 的缩写,elrepo-kernel中列出来的是最新的稳定主线版本。 kernel-lt kernel-lt中的lt是英文 “long term support” 的缩写,elrepo-kernel 中列出来的长期支持版本。安装kernel安装新内核(kernel-core、kernel-modules 与 kernel 依赖自动更新)# yum --disablerepo=\* --enablerepo=elrepo-kernel install -y kernel-ml.x86_64 安装新内核相关软件(--skip-broken必须) # yum --disablerepo=\* --enablerepo=elrepo-kernel install -y kernel-ml-devel kernel-ml-tools kernel-ml-tools-libs kernel-ml-tools-libs-devel kernel-ml-headers --skip-broken确认默认启动内核(般更新的内核为默认启动内核)# grubby --default-kernel /boot/vmlinuz-6.2.7-1.el9.elrepo.x86_64如果不是的话,先看查看系统安装的全部内核# grubby --default-kernel /boot/vmlinuz-6.2.7-1.el9.elrepo.x86_64 [root@iZuf6g4xzntqr7ucc5swmkZ ~]# grubby --info=ALL index=0 kernel="/boot/vmlinuz-6.2.7-1.el9.elrepo.x86_64" args="ro rhgb quiet net.ifnames=0 console=tty0 console=ttyS0,115200n8 nvme_core.io_timeout=4294967295 nvme_core.admin_timeout=4294967295 crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M $tuned_params" root="UUID=8537de8b-6254-450c-9946-5ff5ad4af6dc" initrd="/boot/initramfs-6.2.7-1.el9.elrepo.x86_64.img $tuned_initrd" title="Rocky Linux (6.2.7-1.el9.elrepo.x86_64) 9.1 (Blue Onyx)" id="20220630095603711861013686113992-6.2.7-1.el9.elrepo.x86_64" index=1 kernel="/boot/vmlinuz-5.14.0-162.18.1.el9_1.x86_64" args="ro rhgb quiet net.ifnames=0 console=tty0 console=ttyS0,115200n8 nvme_core.io_timeout=4294967295 nvme_core.admin_timeout=4294967295 $tuned_params crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M" root="UUID=8537de8b-6254-450c-9946-5ff5ad4af6dc" initrd="/boot/initramfs-5.14.0-162.18.1.el9_1.x86_64.img $tuned_initrd" title="Rocky Linux (5.14.0-162.18.1.el9_1.x86_64) 9.1 (Blue Onyx)" id="20220630095603711861013686113992-5.14.0-162.18.1.el9_1.x86_64" index=2 kernel="/boot/vmlinuz-0-rescue-20220630095603711861013686113992" args="ro rhgb quiet net.ifnames=0 console=tty0 console=ttyS0,115200n8 nvme_core.io_timeout=4294967295 nvme_core.admin_timeout=4294967295 crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M" root="UUID=8537de8b-6254-450c-9946-5ff5ad4af6dc" initrd="/boot/initramfs-0-rescue-20220630095603711861013686113992.img" title="Rocky Linux (0-rescue-20220630095603711861013686113992) 8.6 (Green Obsidian)" id="20220630095603711861013686113992-0-rescue"设置新的默认启动内核# grubby --set-default=/boot/vmlinuz-6.2.7-1.el9.elrepo.x86_64 或者 # grubby --set-default-index=0重启之后,再次查看内核版本# uname -a Linux iZuf6g4xzntqr7ucc5swmkZ 5.14.0-162.18.1.el9_1.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Mar 1 22:02:24 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux # uname -r 6.2.7-1.el9.elrepo.x86_64删除旧内核(可选的)# rpm -e --nodeps `rpm -qa|grep -i kernel|grep 5.14`再次查看当前的内核,检查是否删除成功。# rpm -qa | grep kernel kernel-srpm-macros-1.0-11.el9.noarch kernel-ml-core-6.2.7-1.el9.elrepo.x86_64 kernel-ml-modules-6.2.7-1.el9.elrepo.x86_64 kernel-ml-6.2.7-1.el9.elrepo.x86_64
2023年03月05日
35 阅读
0 评论
0 点赞