0
点赞
收藏
分享

微信扫一扫

Centos 7.9 update to 8.5

1. 查看系统版本

[root@ganluren-wk ~]# cat /etc/redhat-releaseCentos 7.9 update to 8.5_centos

2.安装epel源

[root@ganluren-wk ~]# yum -y install epel-releaseCentos 7.9 update to 8.5_centos_02

3.安装rpmconf软件包

[root@ganluren-wk ~]# yum -y install rpmconfCentos 7.9 update to 8.5_启动项_03

4. 使用rpmconf命令检查所有软件包的配置文件:

[root@ganluren-wk ~]# rpmconf –aCentos 7.9 update to 8.5_centos_04

5.清理不需要的rpm 包

[root@ganluren-wk ~]# package-cleanup --leaves

[root@ganluren-wk ~]# package-cleanupCentos 7.9 update to 8.5_linux_05 --orphansCentos 7.9 update to 8.5_centos_06

6. 安装CentOS 8默认包管理器dnf

[root@ganluren-wk ~]# yum -y install dnfCentos 7.9 update to 8.5_linux_07

7.删除Centos7默认包管理器yum

[root@ganluren-wk ~]# dnf -y remove yum  yum-metadata-parserCentos 7.9 update to 8.5_linux_08

[root@ganluren-wk ~]# rm -rf /etc/yum

8.升级系统

[root@ganluren-wk ~]# dnf upgradeCentos 7.9 update to 8.5_centos 升级_09

9. 安装Centos8.5 发行包

[root@ganluren-wk~]# dnf install https://mirrors.aliyun.com/centos/8.5.2111/BaseOS/x86_64/os/Packages/{centos-linux-repos-8-3.el8.noarch.rpm,centos-linux-release-8.5-1.2111.el8.noarch.rpm,centos-gpg-keys-8-3.el8.noarch.rpm}

Centos 7.9 update to 8.5_centos 升级_10

10.升级epel 源

[root@ganluren-wk~]# dnf upgrade https://mirrors.aliyun.com/epel/epel-release-latest-8.noarch.rpm

Centos 7.9 update to 8.5_centos 升级_11

11.查看系统版本

[root@ganluren-wk ~]# cat /etc/redhat-release

12 升级内核版本,查看内核版本

[root@ganluren-wk ~]# cat /proc/versionCentos 7.9 update to 8.5_centos 升级_12


13.添加elrepo存储库

[root@ganluren-wk~]# rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm    

Centos 7.9 update to 8.5_启动项_13

14. 导入GPG密钥

[root@ganluren-wk~]# rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

Centos 7.9 update to 8.5_linux_14

15. 安装linux kernel

查询资源库中可用的内核版本

[root@ganluren-wk ~]# dnf --enablerepo="elrepo-kernel" list --showduplicates | sort -r | grep kernel-ml.x86_64Centos 7.9 update to 8.5_linux_15

选择 ML 或 LT 版本安装

安装 ML 版本

[root@ganluren-wk ~]# dnf --enablerepo=elrepo-kernel install  kernel-ml-devel kernel-ml –y

安装 LT 版本,K8S全部选这个

yum --enablerepo=elrepo-kernel install kernel-lt-devel kernel-lt –yCentos 7.9 update to 8.5_centos_16

16. 查看现有内核启动顺序

[root@ganluren-wk ~]# awk -F\' '$1=="menuentry " {print $2}' /etc/grub2.cfgCentos 7.9 update to 8.5_centos_17

17. 修改默认启动项

xxx 为序号数字,以指定启动列表中第x项为启动项,x从0开始计数 下次启动从6.2.11启动

[root@ganluren-wk ~]# grub2-set-default 0

18.重启,检查内核版本

[root@ganluren-wk ~]# reboot

[root@ganluren-wk ~]# cat /proc/versionCentos 7.9 update to 8.5_centos_18

Centos 7.9 update to 8.5_centos 升级_19

19. 删除低版本内核

查询系统中全部内核

[root@ganluren-wk ~]# rpm -qa | grep kernelCentos 7.9 update to 8.5_centos 升级_20

删除内核

[root@ganluren-wk ~]# dnf remove -y kernel-3.10.0-1160.88.1.el7.x86_64

[root@ganluren-wk ~]# dnf remove -y kernel-3.10.0-1160.el7.x86_64Centos 7.9 update to 8.5_启动项_21Centos 7.9 update to 8.5_linux_22

查看内核启动顺序

Centos 7.9 update to 8.5_centos 升级_23



举报

相关推荐

0 条评论