0% found this document useful (0 votes)
56 views

Upgrading OS Oracle Linux 6 to OL7

Uploaded by

KaNika TH11
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views

Upgrading OS Oracle Linux 6 to OL7

Uploaded by

KaNika TH11
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Upgrading Oracle Linux 6 to Oracle Linux 7

1. Current Version:

[root@ora02 ~]#
[root@ora02 ~]# uname -a
Linux ora02 4.1.12-61.1.28.el6uek.x86_64 #2 SMP Thu Feb 23 20:03:53 PST 2017 x86_64 x86_64
x86_64 GNU/Linux
[root@ora02 ~]#
[root@ora02 ~]# lsb_release -a
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-
amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: OracleServer
Description: Oracle Linux Server release 6.9
Release: 6.9
Codename: n/a
[root@ora02 ~]#
[root@ora02 ~]# cat /proc/version
Linux version 4.1.12-61.1.28.el6uek.x86_64 (mockbuild@x86-ol6-builder-06) (gcc version 4.4.7
20120313 (Red Hat 4.4.7-16) (GCC) ) #2 SMP Thu Feb 23 20:03:53 PST 2017
[root@ora02 ~]#
[root@ora02 ~]#
[root@ora02 ~]# cat /etc/*-release
LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-
amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Oracle Linux Server release 6.9
NAME="Oracle Linux Server"
VERSION="6.9"
ID="ol"
VERSION_ID="6.9"
PRETTY_NAME="Oracle Linux Server 6.9"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:6:9:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://bugzilla.oracle.com/"

ORACLE_BUGZILLA_PRODUCT="Oracle Linux 6"


ORACLE_BUGZILLA_PRODUCT_VERSION=6.9
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=6.9
Red Hat Enterprise Linux Server release 6.9 (Santiago)
Oracle Linux Server release 6.9
[root@ora02 ~]#

2. Update Latest OL6 version:


Configure yum local
rpm -ivh createrepo-0.9.9-26.el6.noarch.rpm python-deltarpm-3.5-
0.5.20090913git.el6.x86_64.rpm deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm

Prepared by SUOS Dara 12/2022


copy package to /u01/Packages
yum clean all
createrepo --database /u01/Packages
vi /etc/yum.repos.d/local.repo
[local]
name=Local Repo
baseurl=file:///u01/Packages
enabled=1
gpgcheck=0

Update latest OL6


[root@ora02 ~]# yum update -y

3. After upgraded latest OL6

[root@ora02 ~]#
[root@ora02 ~]# lsb_release -a
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-
amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: OracleServer
Description: Oracle Linux Server release 6.10
Release: 6.10
Codename: n/a
[root@ora02 ~]#
[root@ora02 ~]# cat /proc/version
Linux version 4.1.12-124.16.4.el6uek.x86_64 ([email protected]) (gcc version
4.9.2 20150212 (Red Hat 4.9.2-6.2.0.3) (GCC) ) #2 SMP Thu Jun 14 18:55:52 PDT 2018
[root@ora02 ~]#
[root@ora02 ~]#

4. Install required packages to upgrade OL7


Copy more package upgrade

Copy packages upgrade ol6-ol7.txt

Create repo again


yum clean all
createrepo --database /u01/Packages

Install packages to upgrade


yum install -y openscap redhat-upgrade-tool preupgrade-assistant preupgrade-assistant-el6toel7
preupgrade-assistant-el6toel7-data-0 preupgrade-assistant-tools preupgrade-assistant-ui

log install required packages.txt

Prepared by SUOS Dara 12/2022


5. Run the upgrade assessment command/tools

[root@ora02 Packages]# preupg


The Preupgrade Assistant is a diagnostics tool
and does not perform the actual upgrade.
Do you want to continue? [Y/n]
y

log run preupg.txt

Log show error “GNOME desktop environment”

If not change initab => reboot not up


vi /etc/inittab
## Old: id:5:initdefault:
## New: id:3:initdefault:

# yum remove gnom*

Run again

[root@ora02 ~]# preupg

log run preupg second time.txt

6. Copy the ISO to server


# mkdir -p /u01/backup
Copy file V980739-01.iso up to server path: /u01/backup
7. Run the upgrade tool

# redhat-upgrade-tool-cli --iso=/u01/backup/V980739-01.iso --debuglog=/tmp/upgrade.log --


cleanup-post

Prepared by SUOS Dara 12/2022


log run fail.txt

Copy file fix


# cp /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

Run again
# redhat-upgrade-tool-cli --iso=/u01/backup/V980739-01.iso --debuglog=/tmp/upgrade.log --
cleanup-post
Confirm “Is this ok [y/N]: y”

Log run first upgrade failed.txt

Network interface have change to net0 so we can’t login. Reboot


8. Run the same update tool again as first time got failed
Lost connection can’t remote SSH. Reboot => can login
# redhat-upgrade-tool-cli --iso=/u01/backup/V980739-01.iso --debuglog=/tmp/upgrade.log --
cleanup-post
Still cannot but yum group ok
Remove GNOME….
# yum groupremove 'X Window System' 'GNOME' yum groupremove "multimedia" "internet-
browser" "guest-agents" "guest-desktop-agents" "x11" "print-client" "dial-up"

log yum groupremove.txt

Run upgrade again


# redhat-upgrade-tool-cli --iso=/u01/backup/V980739-01.iso --debuglog=/tmp/upgrade_final.log -
-cleanup-post

Prepared by SUOS Dara 12/2022


Log upgrade OS Ok.txt

9. Reboot the system to start the upgrade process


#reboot

10. Version details after upgradation

[root@ora02 ~]#
[root@ora02 ~]# cat /etc/*-release
LSB_VERSION=core-4.1-amd64:core-4.1-noarch
Oracle Linux Server release 7.6
NAME="Oracle Linux Server"
VERSION="7.6"
ID="ol"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.6"
PRETTY_NAME="Oracle Linux Server 7.6"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:7:6:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://bugzilla.oracle.com/"

ORACLE_BUGZILLA_PRODUCT="Oracle Linux 7"


ORACLE_BUGZILLA_PRODUCT_VERSION=7.6
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=7.6
Red Hat Enterprise Linux Server release 7.6 (Maipo)
Oracle Linux Server release 7.6
[root@ora02 ~]#
[root@ora02 ~]#

Install back GNOME


Copy package OL7 to /u01/Packages
Yum local disable
# yum-config-manager --enable Local Repo
yum clean all
createrepo --database /u01/Packages

[root@ora02 ~]# yum install x*


[root@ora02 ~]# yum install gnom*
# systemctl set-default graphical.target
#reboot

Prepared by SUOS Dara 12/2022

You might also like