upgrade RHEL from 7.2 to 7.4 - offline

Hello,

I would like to share my RHEL offline upgrade adventure  after realising that no internet connection in the server.

First of all, I was lucky to have RHEL 7.4 iso file which was compressed with .zip in the RHEL 7.2 server.

Logic is simple;

- unzip RHEL 7.4 file to reveal .iso
- mount it to the server
- configure YUM for upgrade
- upgrade server.

I could not be succeed at my first attempt due to "command not found" message while unpackaging archieve file ;

 unzip rhel-server-7.4-x86_64-dvd.zip

then I found unzip-6.0-1.el6.x86_64.rpm in internet and copied to server

after that I run following command in order to install unzip RPM

yum install unzip-6.0-1.el6.x86_64.rpm

System is now ready to execute;  unzip rhel-server-7.4-x86_64-dvd.zip.

I eventually handle ISO file.

It was good time to mount ISO file to start upgrade process:

1- make directory which will host ISO file as a new drive

mkdir /media/rhel74

2- mount iso file to the newly created directory

 mount -o loop rhel-server-7.4-x86_64-dvd.iso /media/rhel74

3- take discinfo id to be used during YUM configuration

head -n1 /media/rhel74/.discinfo

Take a note of the number. Number can be following format : 1499751070.690815

4- create repo file for YUM

vi /etc/yum.repos.d/RHEL_7_Disc.repo

5- append following command to the newly created file via VI

[RHEL74]
mediaid=1499751070.690815
name=RHEL74
baseurl=file:///media/rhel74/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
enabled=1
gpgcheck=1

/*
explanation

[repository] 
mediaid=media_id 
name=repository_name
baseurl=repository_url
gpgkey=gpg_key 
enabled=1 
gpgcheck=1
*/

6- save and quit
7- yum update
/* upgrade will start. it may take 10 minutes */
8- verify version by following command:
cat /etc/redhat-release

once you complete upgrade, you can unmount drive and rollback what you create.
1- unmount /media/rhel74/
2- rmdir unmount /media/rhel74/
3- rm /etc/yum.repos.d/RHEL_7_Disc.repo


good luck.







Comments

Popular posts from this blog

Assembly Microsoft.Dynamics.Service.Plugins.dll can not be loaded. Dynamics CRM 365 Engine version 9 - CRM User creation error

Exception caught instantiating TERADATA report server extension SQL Reporting Services

Could not load file or assembly 'System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified at Configuration class initiation in CrmServiceHelper.cv