-
-
Save athamour1/5f53ee7ceafedbfac55c5fea31d2f207 to your computer and use it in GitHub Desktop.
Upgrade RHEL 7.9 to 8.9 bash script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Register the system (if not already done) | |
# subscription-manager register --username YOUR_USERNAME --password YOUR_PASSWORD | |
# Verify the system subscription | |
subscription-manager status | |
# Enable necessary repositories | |
subscription-manager repos --enable rhel-7-server-rpms | |
subscription-manager repos --enable rhel-7-server-extras-rpms | |
# Unset Red Hat Subscription Manager to use the latest RHEL 7 content | |
subscription-manager release --unset | |
# Install yum-plugin-versionlock if not present | |
yum install yum-plugin-versionlock -y | |
# Clear any version locks | |
yum versionlock clear | |
# Update all packages | |
yum update -y | |
# Reboot the system | |
reboot | |
# Wait for system to restart and login again | |
# Install the Leapp utility | |
yum install leapp-upgrade -y | |
# Start the upgrade process with target OS version 8.9 | |
leapp upgrade --target 8.9 | |
# Reboot the system to complete the upgrade | |
reboot | |
# The script ends here. Monitor the system for any prompts or messages. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment