如何在 CentOS 6 流上安装 Linux 内核 9.x

Linux命令 Edge插件网 2年前 (2023-03-09) 404次浏览 已收录 0个评论

Linux内核是Linux操作系统的核心。它负责管理系统硬件和软件之间的通信,并提供允许应用程序访问系统资源的接口。升级到最新版本的 Linux 内核是保持 CentOS Stream 系统最新和安全的重要一步。如何在 CentOS 6 流上安装 Linux 内核 9.x

在 CentOS 6 流上安装 Linux 内核 9.x

第 1 步。首先,让我们首先确保您的系统是最新的。

<span class="pln">sudo dnf clean all
sudo dnf update</span>

第 2 步。检查您的内核。

通过运行以下命令检查当前内核版本:

<span class="pln">uname </span><span class="pun">-</span><span class="pln">r</span>

第 3 步。启用 ELRepo。

在更新内核之前,请使用以下命令导入公钥并安装 ELRepo RPM 软件包:

<span class="pln">rpm </span><span class="pun">--</span><span class="kwd">import</span><span class="pln"> https</span><span class="pun">:</span><span class="com">//www.elrepo.org/RPM-GPG-KEY-elrepo.org</span><span class="pln">
dnf install https</span><span class="pun">:</span><span class="com">//www.elrepo.org/elrepo-release-9.el9.elrepo.noarch.rpm</span>

完成后,运行以下命令以列出可用的内核相关包:

<span class="pln">dnf </span><span class="pun">--</span><span class="pln">disablerepo</span><span class="pun">=</span><span class="str">"*"</span> <span class="pun">--</span><span class="pln">enablerepo</span><span class="pun">=</span><span class="str">"elrepo-kernel"</span><span class="pln"> list available</span>

输出:

<span class="typ">Available</span> <span class="typ">Packages</span><span class="pln">
bpftool</span><span class="pun">.</span><span class="pln">x86_64                           </span><span class="lit">6.1</span><span class="pun">.</span><span class="lit">7</span><span class="pun">-</span><span class="lit">1.el9.elrepo</span><span class="pln">        elrepo</span><span class="pun">-</span><span class="pln">kernel
kernel</span><span class="pun">-</span><span class="pln">ml</span><span class="pun">.</span><span class="pln">x86_64                         </span><span class="lit">6.1</span><span class="pun">.</span><span class="lit">7</span><span class="pun">-</span><span class="lit">1.el9.elrepo</span><span class="pln">        elrepo</span><span class="pun">-</span><span class="pln">kernel
kernel</span><span class="pun">-</span><span class="pln">ml</span><span class="pun">-</span><span class="pln">core</span><span class="pun">.</span><span class="pln">x86_64                    </span><span class="lit">6.1</span><span class="pun">.</span><span class="lit">7</span><span class="pun">-</span><span class="lit">1.el9.elrepo</span><span class="pln">        elrepo</span><span class="pun">-</span><span class="pln">kernel
kernel</span><span class="pun">-</span><span class="pln">ml</span><span class="pun">-</span><span class="pln">devel</span><span class="pun">.</span><span class="pln">x86_64                   </span><span class="lit">6.1</span><span class="pun">.</span><span class="lit">7</span><span class="pun">-</span><span class="lit">1.el9.elrepo</span><span class="pln">        elrepo</span><span class="pun">-</span><span class="pln">kernel
kernel</span><span class="pun">-</span><span class="pln">ml</span><span class="pun">-</span><span class="pln">devel</span><span class="pun">-</span><span class="pln">matched</span><span class="pun">.</span><span class="pln">x86_64           </span><span class="lit">6.1</span><span class="pun">.</span><span class="lit">7</span><span class="pun">-</span><span class="lit">1.el9.elrepo</span><span class="pln">        elrepo</span><span class="pun">-</span><span class="pln">kernel
kernel</span><span class="pun">-</span><span class="pln">ml</span><span class="pun">-</span><span class="pln">doc</span><span class="pun">.</span><span class="pln">noarch                     </span><span class="lit">6.1</span><span class="pun">.</span><span class="lit">7</span><span class="pun">-</span><span class="lit">1.el9.elrepo</span><span class="pln">        elrepo</span><span class="pun">-</span><span class="pln">kernel
kernel</span><span class="pun">-</span><span class="pln">ml</span><span class="pun">-</span><span class="pln">headers</span><span class="pun">.</span><span class="pln">x86_64                 </span><span class="lit">6.1</span><span class="pun">.</span><span class="lit">7</span><span class="pun">-</span><span class="lit">1.el9.elrepo</span><span class="pln">        elrepo</span><span class="pun">-</span><span class="pln">kernel
kernel</span><span class="pun">-</span><span class="pln">ml</span><span class="pun">-</span><span class="pln">modules</span><span class="pun">.</span><span class="pln">x86_64                 </span><span class="lit">6.1</span><span class="pun">.</span><span class="lit">7</span><span class="pun">-</span><span class="lit">1.el9.elrepo</span><span class="pln">        elrepo</span><span class="pun">-</span><span class="pln">kernel
kernel</span><span class="pun">-</span><span class="pln">ml</span><span class="pun">-</span><span class="pln">modules</span><span class="pun">-</span><span class="pln">extra</span><span class="pun">.</span><span class="pln">x86_64           </span><span class="lit">6.1</span><span class="pun">.</span><span class="lit">7</span><span class="pun">-</span><span class="lit">1.el9.elrepo</span><span class="pln">        elrepo</span><span class="pun">-</span><span class="pln">kernel
kernel</span><span class="pun">-</span><span class="pln">ml</span><span class="pun">-</span><span class="pln">tools</span><span class="pun">.</span><span class="pln">x86_64                   </span><span class="lit">6.1</span><span class="pun">.</span><span class="lit">7</span><span class="pun">-</span><span class="lit">1.el9.elrepo</span><span class="pln">        elrepo</span><span class="pun">-</span><span class="pln">kernel
kernel</span><span class="pun">-</span><span class="pln">ml</span><span class="pun">-</span><span class="pln">tools</span><span class="pun">-</span><span class="pln">libs</span><span class="pun">.</span><span class="pln">x86_64              </span><span class="lit">6.1</span><span class="pun">.</span><span class="lit">7</span><span class="pun">-</span><span class="lit">1.el9.elrepo</span><span class="pln">        elrepo</span><span class="pun">-</span><span class="pln">kernel
kernel</span><span class="pun">-</span><span class="pln">ml</span><span class="pun">-</span><span class="pln">tools</span><span class="pun">-</span><span class="pln">libs</span><span class="pun">-</span><span class="pln">devel</span><span class="pun">.</span><span class="pln">x86_64        </span><span class="lit">6.1</span><span class="pun">.</span><span class="lit">7</span><span class="pun">-</span><span class="lit">1.el9.elrepo</span><span class="pln">        elrepo</span><span class="pun">-</span><span class="pln">kernel
perf</span><span class="pun">.</span><span class="pln">x86_64                              </span><span class="lit">6.1</span><span class="pun">.</span><span class="lit">7</span><span class="pun">-</span><span class="lit">1.el9.elrepo</span><span class="pln">        elrepo</span><span class="pun">-</span><span class="pln">kernel
python3</span><span class="pun">-</span><span class="pln">perf</span><span class="pun">.</span><span class="pln">x86_64                      </span><span class="lit">6.1</span><span class="pun">.</span><span class="lit">7</span><span class="pun">-</span><span class="lit">1.el9.elrepo</span><span class="pln">        elrepo</span><span class="pun">-</span><span class="pln">kernel</span>

第 4 步。在 CentOS 6 流安装 Linux 内核 9.x

现在运行以下命令,将最新的主线稳定内核安装到 CentOS 流系统:

<span class="pln">dnf </span><span class="pun">--</span><span class="pln">enablerepo</span><span class="pun">=</span><span class="pln">elrepo</span><span class="pun">-</span><span class="pln">kernel install kernel</span><span class="pun">-</span><span class="pln">ml</span>

重新启动系统以应用更改,并通过再次运行命令 “” 来检查新的内核版本:uname -r

<span class="pln">uname </span><span class="pun">-</span><span class="pln">r</span>

输出:

<span class="pun">[</span><span class="pln">root@idroot</span><span class="pun">.</span><span class="pln">us </span><span class="pun">~]#</span><span class="pln"> uname </span><span class="pun">-</span><span class="pln">sr
</span><span class="typ">Linux</span> <span class="lit">6.1</span><span class="pun">.</span><span class="lit">7</span><span class="pun">-</span><span class="lit">1.el9.elrepo</span><span class="pun">.</span><span class="pln">x86_64</span>

感謝你使用這本教鬆在 CentOS 6 Stream 上安裝 Linux Kernel 9.x。有关其他帮助或有用信息,我们建议您查看 Linux 内核官方网站


Edge插件网 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:如何在 CentOS 6 流上安装 Linux 内核 9.x
喜欢 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址