Overview
The system meets the minimum installation requirements for Oracle Linux 7 as described in Chapter 1, System Requirements and Limits.
The Oracle Linux 6 system has been completely updated from the ol6_x86_64_latest channel or ol6_latest repository.
UEK R3 or UEK R4 has been installed on the system to be upgraded and is the default boot kernel. Upgrading from UEK R2 is not supported. Note that the system is upgraded to use the UEK R5 release provided with Oracle Linux 7.6.
Upgrading is supported only for systems that are installed with the Minimal Install base environment. If additional packages are installed from an alternative repository or channel, upgrade might fail or the resulting upgrade might not function as expected. reference: https://docs.oracle.com/en/operating-systems/oracle-linux/7/relnotes7.6/ol7-install.html#ol7-upgrade-ol6
# head -1 /etc/*rel* # uname -r # sudo grubby --default-kernel
Step 1: Preparing for the Upgrade
01. If you are upgrading a remote system, ensure remote connection through a console such as VNC.
02. Ensure the system backup to avoid any kind of loss such as data, application, configuration, etc.
03. Shut down all production services such as application, database, corn jobs, etc.
04. Disable Secure Boot if it is running.
To check the status of Secure Boot, choose one of the following commands:
Using bootctl status,
# sudo bootctl status
Or using mokutil –sb-state,
# sudo mokutil --sb-state
If Secure Boot is enabled on your system go to the firmware/bios at boot time and disable the option.
05. Verify that the locale is set to en_US.UTF-8.
# cat /etc/sysconfig/i18nIf necessary, edit the file to set the locale accordingly.
LANG=”en_US.UTF-8″06. If your system has network mounted file systems, unmount them and comment out related entries in the /etc/fstab file.
07. If you installed the yum-plugin-versionlock package, clear any packages with locked versions.
# sudo yum version lock clear08. Configure Oracle Linux Yum server public repo.
# sudo vim /etc/yum.repos.d/public-yum-ol6.repoAnd put the below content for enable public_ol6_latest and public_ol6_addons repository.
[public_ol6_latest]name=Oracle Linux $releasever Latest ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/latest/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1
[public_ol6_addons]
name=Oracle Linux $releasever Add ons ($basearch)
baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/addons/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1
09. Obtain the latest Oracle Linux 6 packages.
# sudo yum update10. If your system is currently registered with ULN or a ULN mirror, unregister the system.
Removing a System From ULN in Oracle Linux check out the link.
Checking Yum Configuration check out the link.
11. Reboot the system.
# sudo reboot12. Make sure that your system is completely up to date by using the yum update command to update to the latest Oracle Linux 6 release. The system must be subscribed to the ol6_x86_64_latest and ol6_x86_64_addons channels or ol6_latest and ol6_addons repositories to be updated. Install the pre-upgrade utility that reside in the public_ol6_addons repository by default. Location of addon repo is https://yum.oracle.com/repo/OracleLinux/OL6/addons/x86_64/. Install the latest versions of the required upgrade packages:
# sudo yum install openscap redhat-upgrade-tool preupgrade-assistant preupgrade-assistant-el6toel7 preupgrade-assistant-el6toel7-data-0 preupgrade-assistant-tools preupgrade-assistant-ui
In my case, preupgrade-assistant-el6toy el7-data-0 package was not available but it is not inhibited at all.
After installing the redhat-upgrade-tool check the version of this package. The version of this package determines which release the system will upgrade.
redhat-upgrade-tool | OL will be upgrade to |
redhat-upgrade-tool-0.7.48-1.0.2.el6.noarch.rpm | allows upgrade only to the system version OL-7.5 Server |
redhat-upgrade-tool-0.7.49-1.0.2.el6.noarch.rpm | allows upgrade only to the system version OL-7.5 Server |
redhat-upgrade-tool-0.7.51-1.0.2.el6.noarch.rpm | allows upgrade only to the system version OL-7.6 Server |
redhat-upgrade-tool-0.7.52-1.0.1.el6.noarch.rpm | allows upgrade only to the system version OL-7.6 Server |
redhat-upgrade-tool-0.8.0-4.0.1.el6.noarch.rpm | allows upgrade only to the system version OL-7.6 Server |
in my case, my system will upgrade to OL-7.6 for this reason I need OL-7.6 iso file.
Step 2: Upgrading the System
01. Grant root SSH login permissions in the /etc/ssh/sshd_config file.
# PermitRootLogin yes02. Run the preupg command for pre-upgrade assessments. The following command is only for the physical system not for the Oracle Cloud Infrastructure instance.
# sudo preupgThis process generates a process log, a report, and a file called answerfile.
Analyzing the Leapp Report
The /root/preupgrade/result.html
file summarises the issues, identifies potential risks and also suggests the remediation path to the upgrade. Open this analysis report with a browser. The risks are classified as an inhibitor, high, medium, or low. The inhibitor and high risk would prevent an upgrade. Read the file thoroughly and solve the issue accordingly. Without resolving inhibited issues you can not go ahead.
Performing the Upgrade
Choose one out of the three methods described below for performing the upgrade process.
01. Installation repository:For example,
02. Mounted installation media:
Run blkid command and find the mounted iso device path.
In my case, /dev/sr0: LABEL=”OL-7.6 Server.x86_64″ TYPE=”iso9660″ this is my iso device. Mount this iso device to /mnt directory.
# sudo mount -r -t iso9660 /dev/sr0 /mntNow substitute the device_path with the mounted device path For example,
If you do not specify the device path, the Red Hat Upgrade Tool scans all mounted removable devices.
03. ISO image:
For example,
Reboot the system after completing the upgrade process.
# sudo reboot
Monitor the boot progress on the console, while the system is rebooting.
Verifying the system after Upgrade
# head -1 /etc/*rel*# uname -r# sudo grubby --default-kernel
Step 3: Completing Postupgrade Tasks
Check this link.
Conclusion
This tutorial helps you How to upgrade your existing Oracle Linux 6 system to 7. If have any queries please comment to us. follow the link to Upgrading Redhat Linux 7 to 8 With Leapp.
References
In this tutorial, I follow the official docs as reference Performing Systems Upgrade With Leapp (Oracle Linux 7).
Comments
Post a Comment