Centos 8 安裝最新內核


Centos 8 安裝最新內核可以分為:

  • 在線安裝
  • 編譯安裝

 

方法一,在線安裝

在線升級內核非常簡單,Let's go...

  第一步,查看當前內核版本

    $ uname -r

    4.18.0-147.5.1.el8_1.x86_64

 

  第二步,確認最新穩定內核版本

    在 https://www.kernel.org/ 和 https://elrepo.org/linux/kernel/el8/x86_64/ 查詢到當前最新kernel版本為 5.5.5

 

  第三步,安裝ELRepo

    1.Import public key
    $ rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

    2.Install ELRepo for RHEL-8 or CentOS-8:
    $ dnf install https://www.elrepo.org/elrepo-release-8.1-1.el8.elrepo.noarch.rpm

 

  第四步,安裝內核

     $ dnf --disablerepo=\* --enablerepo=elrepo -y install kernel-ml kernel-ml-devel

  第五步,重啟系統后查看當前內核版本

    $ grubby --default-kernel
    /boot/vmlinuz-5.5.5-1.el8.elrepo.x86_64

    $ uname -r
    5.5.5-1.el8.elrepo.x86_64

 

  

方法二,編譯安裝 

  第一步,在 https://www.kernel.org/ 獲取最新穩定內核下載地址

 

  第二步,下載並解壓內核

     $ wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.5.5.tar.xz

     $ tar xf linux-5.5.5.tar.xz

 

  第三步,重啟系統后查看當前內核版本

    $ dnf -y groupinstall 'Development Tools'

    $ dnf -y install ncurses-devel openssl-devel elfutils-libelf-devel

 

  第四步,配置manuconfig

    $ cd linux-5.5.5

    $ cp /boot/config-4.18.0-147.5.1.el8_1.x86_64 .config

    # 編輯 .config 文件注釋以下行

       CONFIG_SYSTEM_TRUSTED_KEYS="certs/rhel.pem" 

    $ make manuconfig

    # 選擇Load導入.config的配置,並修改所需要編譯的功能,然后Save。

 

  第四步,編譯安裝

    $ make modules_install

    $ make install

    $ ls /boot

  

  第五步,重啟系統后查看當前內核版本

    $ grubby --default-kernel
    /boot/vmlinuz-5.5.5-1.el8.elrepo.x86_64

    $ uname -r
    5.5.5-1.el8.elrepo.x86_64

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2026 CODEPRJ.COM