使用CentOS的ISO升級Linux Kernel

1. 下載CentOS的ISO文件

以CentOS爲例,我們可以在這裏下載CentOS的ISO文件,通過curl命令進行ISO文件的下載。

curl -LO http://mirror.vpshosting.com.hk/pub/linux/centos/7.6.1810/isos/x86_64/CentOS-7-x86_64-DVD-1810.iso

2. 通過ISO文件構築Local的Yum Repo

Mount ISO文件

mount -o loop CentOS-7-x86_64-DVD-1810.iso /mnt

創建repo文件/etc/yum.repos.d/media.repo

[InstallMedia]
name=CentOS 7.6
enabled=1
gpgcheck=0
baseurl=file:///mnt/

3. 更新Kernel

yum upgrade kernel

4. 更新Bootstrap

grub2-mkconfig -o /boot/grub2/grub.cfg

5. Reboot

6. Reference

Need to set up yum repository for locally-mounted DVD on Red Hat Enterprise Linux 7 or later

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章