Upgrade RHEL 6.5 to to the latest release

How To Upgrade RHEL 6.5 to RHEL 6.X (To the latest release)

Contents

RHEL 7.5(Beta) version has been released, if you are using older version 6.x release of RHEL operating system, this article will help to upgrade RHEL 6.5 to latest release RHEL 6.9.

Rhel Upgrade-Automation Laboratories

 

Prerequisites:

  1. Backup of OS iso image needs to be taken care of.
  2. Backup of important data:
  • backup all databases as per your running application (MySQL, PostgreSQL, etc.)
  • backup all configuration files (cron entries, cluster files, Apache, PHP, MySQL, DNS and Other services)
  • backup all websites data running on the web server
  • backup other services if any running on the system
  • backup of jar files, scripts, etc.
  • backup of important filesystem needs to be taken care of either on some other server or on tape library according to your system availability.

Following is the command to take backup of filesystem manually and transferred to some other server (the server will have enough space).

# dump -0u -f - /dev/sdy6| ssh [email protected] dd of=/tmp/data.dump

Above command will take the dump of file system “/dev/sdy6” on the server and will transfer the dump to the “xx.xx.xx.xx” server under the directory “/tmp” with the name “data.dump”

Major changes on RHEL 6.9:

  • Red Hat Enterprise Linux 6.9 includes the Open vSwitch kernel module,
  • KeepAlived and HAProxy packages are now fully supported,
  • Added functionality of System Security Services Daemon (SSSD) enables better interoperability of Red Hat Enterprise Linux clients with Active Directory,
  • Performance Co-Pilot (PCP) provides a framework and services to support system-level performance monitoring and management,
  • New hyperv-daemons packages have been added to Red Hat Enterprise Linux 6.9.
  • GFS filesystem hanging problem is also resolved with this release.

Follow the below steps to upgrade it: (Given example is to upgrade from RHEL 6.5 to RHEL 6.9)

  1. Check the current version of your release, use the following command to check the current release
# cat /etc/redhat-release
  1. Configure yum repository with ISO image of RHEL 6.9

RedHat repository is required for installing dependent rpm’s during installation. If severs do not have access to Redhat satellite or internet access, then create local yum repository with RedHat DVD available in datacenter.

Following is the procedure to create local repository (with ROOT user):

    1. Download RedHat DVD rhel-server-6.9-x86_64-dvd image on server in /data directory. (you can change the directory according to your need)
    2. Mount ISO image.
“mkdir -p /var/RedHAt_OSimage”

“mount –o loop /data/rhel-server-6.9-x86_64-dvd /var/RedHAt_OSimage”
    1. Copy all files from /var/RedHAt_OSimage/Packages in new directory /data/redhatrepo/
“mkdir /data/redhatrepo/”

“mkdir /data/redhatrepo/HA”

“cp /var/RedHAt_OSimage/Packages/* /data/redhatrepo/”

“cp /var/RedHAt_OSimage/HighAvailability/* /data/redhatrepo/HA” (this package is for pacemaker cluster)
    1. In the /etc/yum.repos.d directory, create file /etc/yum.repos.d/localrepo.repo having below entries:

vim /etc/yum.repos.d/localrepo.repo

“[localrepo]

name=Unixmen Repository

baseurl=file:///data/redhatrepo/

gpgcheck=0

enabled=1

[HAlocalrepo]

name=HA Repository

baseurl=file:///data/redhatrepo/HA

gpgcheck=0

enabled=1”
    1. Install required yum rpms from /data/redhatrepo/ as below:
"cd /data/redhatrepo/"

"rpm –ivh deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm"

"rpm –ivh python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm"

"rpm –ivh createrepo-0.9.9-18.el6.noarch.rpm"
    1. Create Repository
“createrepo –v /data/redhatrepo/”

“createrepo –v /data/redhatrepo/HA/”
    1. Cleanup the yum cache
“yum clean all”
    1. Test that you can use yum to access the repository.
“yum repolist”

From the above command, you will get the below output.

Loaded plugins: product-id, refresh-packagekit, security, subscription-manager

Updating certificate-based repositories.

localrepo | 1.3 kB 00:00 ...

repo id repo name status

localrepo Unixmen Repository 3,596

repolist: 3,596
  1. Now let’s look what are the updates available for your system.
“yum check-update”
  1. If satisfied with the list of updates from the above output, then issue the following command to install the same
“yum update”

Once downloaded, it will automatically start installing it.

  1. If you are facing with some rpm dependencies error while updating the same, first you need to resolve those errors and then proceed further, otherwise, it wouldn’t update.
  2. Once completed reboot the machine with the following command
“reboot”
  1. You can verify the RHEL version with the following command
# cat /etc/redhat-release

(output should show the latest release of RHEL i.e. 6.9)

That’s all, now you have the latest version of RHEL

If you like this post, give it some sharing ?

I hope you enjoyed what has been introduced in this post about the upgradation of RHEL.

Please leave a comment or write something if you find any gap.

Thank you 







Divya Gupta - Automation Laboratories

Linux System Admin | shell scripting | Ansible developer

Leave a Reply

Your email address will not be published. Required fields are marked *