Centos7 离线升级到 Redhat8步骤

本文详细介绍了如何从CentOS7.6通过离线方式逐步升级到RHEL8.8。首先升级到CentOS7.9,再转换为Redhat7.9,最后升至RHEL8.8。升级过程中涉及配置yum源、使用convert2rhel工具、解决升级抑制问题等关键步骤。

从centos7.6升级到redhat8.8按照redhat官方支持的转化路径要求,首先需要先升级到centos7.9,然后转换成redhat7.9,最后才能升级到redhat8.8。

  • 从Centos7.6 升级到Centos7.9

1.检查目前操作系统版本

[root@test ~]# cat  /etc/centos-release

CentOS Linux release 7.6.1810 (Core)

[root@test ~]# uname  -r

3.10.0-957.el7.x86_64

2.配置yum源

[root@test ~]# cd  /etc/yum.repos.d/

可以提前准备好centos7.9 yum仓库,本机使用的本地源仓库

备份系统repo文件,编辑本地源repo文件

[root@test ~]#vi local.repo

编辑内容如下:

[centos7.9]

name=centos7.9

baseurl=file:///mnt/

enabled=1

gpgcheck=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

3.上传并挂载CentOS-7-x86_64-DVD-200.iso本地镜像

下载镜像地址CentOS Mirrors List

[root@test soft]# mount  -o loop CentOS-7-x86_64-DVD-2009.iso  /mnt

mount: /dev/loop0 is write-protected, mounting read-only

4.升级操作,指定自定义的仓库centos79

[root@test /]# yum --disablerepo=* --enablerepo=centos7.9  update -y

升级过程请耐心等待

Complete!

出现Complete!表现升级完成后

5.重启主机

[root@test /]# reboot

6.检查并确认升级版本信息

[root@test ~]# cat   /etc/centos-release

CentOS Linux release 7.9.2009 (Core)

[root@test ~]# uname  -r

3.10.0-1160.el7.x86_64

系统已经从centos7.6升级到centos7.9

  • Centos7.9 转到到redhat7.9

1.下载convert2rhel工具

转成redhat7.9操作系统需要使用convert2rhel工具,需要先下载convert2rhel-1.6.1-1.el7.noarch.rpm 然后并上传到本机。repository index可以提前准备好redhat7.9 yum仓库,从centos官网下载最新副本,本次实验使用的是本地源仓库。

2.配置redhat7.9的yum本地仓库

[rhel79]

name=rhel79

baseurl=file:///soft/iso

enabled=1

gpgcheck=0

[root@test soft]# mount  -o loop  rhel-server-7.9-x86_64-dvd.iso   /soft/iso

mount: /dev/loop0 is write-protected, mounting read-only

3.进行安装convert2rhel

[root@test soft]# yum install   -y   convert2rhel-1.6.1-1.el7.noarch.rpm

4.系统转换操作

根据实际情况情,可能需要升级grub2 grub2-common grub2-pc grub2-pc-modules grub2-tools grub2-tools-extra grub2-tools-minimal mokutil openssl098e

[root@test /]#  yum update  -y  grub2 grub2-common grub2-pc grub2-pc-modules grub2-tools grub2-tools-extra grub2-tools-minimal mokutil openssl098e

[root@test /]# export CONVERT2RHEL_DISABLE_TELEMETRY=1

[root@test /]# export CONVERT2RHEL_UNSUPPORTED_INCOMPLETE_ROLLBACK=1

[root@test /]# convert2rhel --disable-submgr --disablerepo=* --enablerepo=rhel79 -y

此步骤时间较长,出现下面字体表示转换成功

Conversion successful!

WARNING - In order to boot the RHEL kernel, restart of the system is needed.

5.重启主机

[root@test soft]#

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值