CentOS 8迁移到Rocky Linux 8

本文介绍了centos8操作系统切换成Rocky Linux系统的过程。

1. 更新/升级当前的CentOS系统
进入到您的 CentOS,升级系统,以确保所有软件包准备就绪。

sudo dnf -y upgrade

升级完成后,重新启动系统以确保变更生效,包括与内核相关的变更。

sudo reboot

2. 获取migrate2rocky转换脚本
Rocky Linux 提供了一个名为migrate2rocky的工具,该工具已在许多RHEL变体版本(比如CentOS、Alma Linux和Oracle Linux)上成功地测试。migrate2rocky脚本可用于轻松地就地迁移到 Rocky Linux。

 2.1 手动下载脚本

Download the compressed files from GitHub and extract the one you need (That'd be migrate2rocky.sh). You can find zip files for any GitHub repo on the right-ish side of the repo's main page:

Then, upload the executable to your server with ssh by running this command on your local machine:

scp PATH/TO/FILE/migrate2rocky.sh root@yourdomain.com:/home/

Just, you know, adjust all the file paths and server domains or IP addresses as needed.

 2.2 使用git下载脚本

Install git on your server with:

dnf install git

Then clone the rocky-tools repository with:

git clone https://github.com/rocky-linux/rocky-tools.git

Note: this method will download all of the scripts and files in the rocky-tools repository.

2.3下载脚本。

curl -O https://raw.githubusercontent.com/rocky-linux/rocky-tools/main/migrate2rocky/migrate2rocky.sh

2.4 使脚本可执行。

chmod +x migrate2rocky.sh

3. 开始从CentOS迁移到Rocky Linux的过程
最后,使用本地可用的脚本,用-r选项运行,以便从CentOS 8迁移到Rocky Linux 8。

sudo bash migrate2rocky.sh -r

Preparing to migrate CentOS Linux 8 to Rocky Linux 8. Determining repository names for CentOS Linux 8…. Found the following repositories which map from CentOS Linux 8 to Rocky Linux 8: CentOS Linux 8  Rocky Linux 8 appstream       appstream baseos          baseos extras          extras

该脚本会自动将CentOS 8 Linux代码存储库更改为Rocky Linux代码存储库。耐心等待,因为升级过程可能需要一些时间。

一旦迁移完成,您将看到:

 Done, please reboot your system. A log of this installation can be found at /var/log/migrate2rocky.log

运行以下命令以同步已安装的软件包,然后只需重新启动系统。

sudo dnf distro-sync -y

sudo reboot

验证系统版本

 

参考链接

Migrating To Rocky Linux - Documentation

GitHub - rocky-linux/rocky-tools

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

明算科

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值