
Migrating from CentOS 7 to Rocky Linux 9 is a significant step for anyone relying on a stable and secure operating system. Here’s a step-by-step guide to help you through the process:
- Prerequisites and Assumptions:
- You need a CentOS Stream, CentOS, AlmaLinux, RHEL, or Oracle Linux system running on a hardware server or VPS.
- Ensure you have a working knowledge of the command line and SSH for remote machines.
- Be prepared to run commands as root (either log in as root or use
sudo
).
- Prepare Your Server:
- Obtain the
migrate2rocky
script from the repository. You can do this manually by downloading the compressed files from GitHub and extracting the relevant script (eithermigrate2rocky.sh
ormigrate2rocky9.sh
). - Alternatively, you can install Git on your server and clone the
rocky-tools
repository usinggit clone https://github.com/rocky-linux/rocky-tools.git
. - Make sure you have the necessary HTTP client (e.g.,
curl
,wget
) installed for an easier way to obtain the script.
- Obtain the
- Install Leapp Migration Packages:
- Run the following command to install the Leapp migration packages:
sudo yum install -y leapp-upgrade leapp-data-rocky
- Run the following command to install the Leapp migration packages:
- Run Pre-Upgrade Checks:
- Before upgrading the OS, perform a pre-upgrade check using Leapp.
- Execute the Migration:
- Run the
migrate2rocky
script (ormigrate2rocky9.sh
if you’re on Rocky Linux 9). - The script will change your repositories to those of Rocky Linux, install or upgrade/downgrade packages as necessary, and update your operating system’s branding.
- Run the
- Caveats and Warnings:
- Check the
migrate2rocky
README page for known clashes between the script and Katello’s repositories. - If converting a production server, make data backups and system snapshots or test the migration in a staging environment first.
- Check the
Remember to adapt the instructions to your specific environment and needs. Good luck with your migration! 🚀
For more detailed information, you can refer to the official Rocky Linux documentation.