1. 程式人生 > 其它 >CentOS7 更新最新核心 | RPM直接安裝核心

CentOS7 更新最新核心 | RPM直接安裝核心

1、

https://cloud.tencent.com/developer/article/1499892

解決CenOS7 不能直接升級核心的解決方法,

[root@xx ]# yum --enablerepo=elrepo-kernel install kernel-lt -y Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * elrepo: lon.mirror.rackspace.com * elrepo-kernel: lon.mirror.rackspace.com No package kernel-lt available. Error: Nothing to do

CentOS7 更新最新核心

核心下載地址:https://elrepo.org/linux/kernel/el7/x86_64/RPMS/

核心選擇

kernel-lt(lt=long-term)長期有效

kernel-ml(ml=mainline)主流版本

安裝過程

1.下載核心

wget https://elrepo.org/linux/kernel/el7/x86_64/RPMS/kernel-ml-5.2.4-1.el7.elrepo.x86_64.rpm

2.安裝核心

rpm -ivh kernel-ml-5.2.4-1.el7.elrepo.x86_64.rpm

3.檢視當前預設核心

# grub2-editenv list
saved_entry=CentOS Linux (3.10.0-327.28.3.el7.x86_64) 7 (Core)

4.檢視所有核心啟動 grub2

# awk -F \' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2.cfg 
0 : CentOS Linux (5.2.4-1.el7.elrepo.x86_64) 7 (Core)
1 : CentOS Linux (3.10.0-327.28.3.el7.x86_64) 7 (Core)
2 : CentOS Linux (3.10.0-327.22.2.el7.x86_64) 7 (Core)
3 : CentOS Linux (3.10.0-327.13.1.el7.x86_64) 7 (Core)
4 : CentOS Linux, with Linux 0-rescue-cd8c4444947b4b0b818457f51ded6591

5.修改為最新的核心啟動

grub2-set-default 'CentOS Linux (5.2.4-1.el7.elrepo.x86_64) 7 (Core)'

6.再次檢視核心

# grub2-editenv list
saved_entry=CentOS Linux (5.2.4-1.el7.elrepo.x86_64) 7 (Core)

7.重新啟動

reboot

更新kernel-ml-headers

wget http://ftp.osuosl.org/pub/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-headers-5.2.4-1.el7.elrepo.x86_64.rpm
rpm -ivh kernel-ml-headers-5.2.4-1.el7.elrepo.x86_64.rpm

更新kernel-ml-devel

http://ftp.osuosl.org/pub/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-devel-5.2.4-1.el7.elrepo.x86_64.rpm
rpm -ivh kernel-ml-devel-5.2.4-1.el7.elrepo.x86_64.rpm

(adsbygoogle = window.adsbygoogle || []).push({});