Installing 19.18 Oracle Database on Linux 8.7

Installing 19.18 Oracle Database on Linux 8.7

[root@oratest u01]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.209.128 oratest.oracle.com oratest

[root@oratest ~]# uname -ar
Linux oratest.oracle.com 5.15.0-3.60.5.1.el8uek.x86_64 #2 SMP Wed Oct 19 20:04:4 8 PDT 2022 x86_64 x86_64 x86_64 GNU/Linux
[root@oratest ~]# uname -r
5.15.0-3.60.5.1.el8uek.x86_64

[root@oratest ~]# cat /etc/*-release
Oracle Linux Server release 8.7
NAME=”Oracle Linux Server”
VERSION=”8.7″
ID=”ol”
ID_LIKE=”fedora”
VARIANT=”Server”
VARIANT_ID=”server”
VERSION_ID=”8.7″
PLATFORM_ID=”platform:el8″
PRETTY_NAME=”Oracle Linux Server 8.7″
ANSI_COLOR=”0;31″
CPE_NAME=”cpe:/o:oracle:linux:8:7:server”
HOME_URL=”https://linux.oracle.com/”
BUG_REPORT_URL=”https://bugzilla.oracle.com/”

ORACLE_BUGZILLA_PRODUCT=”Oracle Linux 8″
ORACLE_BUGZILLA_PRODUCT_VERSION=8.7
ORACLE_SUPPORT_PRODUCT=”Oracle Linux”
ORACLE_SUPPORT_PRODUCT_VERSION=8.7
Red Hat Enterprise Linux release 8.7 (Ootpa)
Oracle Linux Server release 8.7

dnf install -y oracle-database-preinstall-19c

[root@cbtest yum.repos.d]# cat media.repo
[LocalRepo_BaseOS]name=LocalRepo_BaseOS
metadata_expire=-1
enabled=1
gpgcheck=1
baseurl=file:///mnt/BaseOS
gpgkey=file:///mnt/RPM-GPG-KEY-redhat-release

[LocalRepo_AppStream]name=LocalRepo_AppStream
metadata_expire=-1
enabled=1
gpgcheck=1
baseurl=file:///mnt/AppStream
gpgkey=file:///mnt/RPM-GPG-KEY-redhat-release

 

It is probably worth doing a full update as well, but this is not strictly speaking necessary.

# yum update -y

/sbin/sysctl -p

[root@oratest ~]# id oracle
uid=1000(oracle) gid=1000(oracle) groups=1000(oracle),10(wheel)
[root@oratest ~]#
[root@oratest ~]#
[root@oratest ~]#
[root@oratest ~]# grep dba /etc/group
dba:x:54322:
backupdba:x:54324:
dgdba:x:54325:
kmdba:x:54326:
racdba:x:54330:
[root@oratest ~]# grep oinstall /etc/group
oinstall:x:54321:
[root@oratest ~]# usermod -u 1000 -g oinstall -G dba oracle

[root@oratest ~]# id oracle
uid=1000(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba)

[root@oratest ~]# vi /etc/selinux/config
[root@oratest ~]# cat /etc/selinux/config

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing – SELinux security policy is enforced.
# permissive – SELinux prints warnings instead of enforcing.
# disabled – No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these three values:
# targeted – Targeted processes are protected,
# minimum – Modification of targeted policy. Only selected processes are protected.
# mls – Multi Level Security protection.
SELINUXTYPE=targeted

[root@oratest ~]# systemctl stop firewalld
[root@oratest ~]# systemctl disable firewalld
Removed /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@oratest ~]#

mkdir -p /u01/app/oracle/product/19.0.0/dbhome_1
chown -R oracle:oinstall /u01/app/oracle
chmod -R 775 /u01/app/oracle

vi /home/oracle/db.env

export TMP=/tmp
export TMPDIR=$TMP

export ORACLE_HOSTNAME=oratest.oracle.com
export ORACLE_UNQNAME=cdb1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/19.0.0/dbhome_1
export ORA_INVENTORY=/u01/app/oraInventory
export ORACLE_SID=cdb1
export PDB_NAME=pdb1
#export DATA_DIR=/u02/oradata

export PATH=/usr/sbin:/usr/local/bin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

 

# Unzip software.

cd $ORACLE_HOME
unzip -oq /u01/media/LINUX.X64_193000_db_home.zip

# Fake Oracle Linux 7.
export CV_ASSUME_DISTID=OEL7.6

create inventory

mkdir -p /u01/app/oraInventory

[root@oratest ~]# vi /etc/oraInst.loc
[root@oratest ~]# cat /etc/oraInst.loc
inventory_loc=/u01/app/oraInventory
inst_group=oinstall

cd $ORACLE_HOME
./runInstaller

(For Putty

1. Download XMING and install and launch XLaunch from Desktop
2. In the PuTTY Configuration section, on the left panel, select Connection → SSH → X11
3. Connect through the user you want to run GUI from

Patch Installation (Optional)

export SOFTWARE_DIR=/u01/software

[oracle@oratest OPatch]$ ./opatch version
OPatch Version: 12.2.0.1.36

OPatch succeeded.

[oracle@oratest dbhome_1]$ cd OPatch_old/
[oracle@oratest OPatch_old]$ ls

auto datapatch emdpatch.pl jre ocm opatchauto opatch_env.sh opatchprereqs operr_readme.txt oracle_common README.txt version.txt
config docs jlib modules opatch opatchauto.cmd opatch.pl operr oplan plugins scripts

[oracle@oratest OPatch_old]$ ./opatch version
OPatch Version: 12.2.0.1.17

OPatch succeeded.

[oracle@oratest 34765931]$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 12.2.0.1.36
Copyright (c) 2023, Oracle Corporation. All rights reserved.

PREREQ session

Oracle Home : /u01/app/oracle/product/19.0.0/dbhome_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/19.0.0/dbhome_1/oraInst.loc
OPatch version : 12.2.0.1.36
OUI version : 12.2.0.7.0
Log file location : /u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/opatch/opatch2023-01-24_14-38-28PM_1.log

Invoking prereq “checkconflictagainstohwithdetail”

Prereq “checkConflictAgainstOHWithDetail” passed.

OPatch succeeded.

export PATH=$PATH:/usr/ccs/bin
opatch apply

 

OJVM Patch

[oracle@oratest 34786990]$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 12.2.0.1.36
Copyright (c) 2023, Oracle Corporation. All rights reserved.

PREREQ session

Oracle Home : /u01/app/oracle/product/19.0.0/dbhome_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/19.0.0/dbhome_1/oraInst.loc
OPatch version : 12.2.0.1.36
OUI version : 12.2.0.7.0
Log file location : /u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/opatch/opatch2023-01-24_15-12-13PM_1.log

Invoking prereq “checkconflictagainstohwithdetail”

Prereq “checkConflictAgainstOHWithDetail” passed.

OPatch succeeded.

[oracle@oratest 34786990]$ opatch apply
Oracle Interim Patch Installer version 12.2.0.1.36
Copyright (c) 2023, Oracle Corporation. All rights reserved.

Oracle Home : /u01/app/oracle/product/19.0.0/dbhome_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/19.0.0/dbhome_1/oraInst.loc
OPatch version : 12.2.0.1.36
OUI version : 12.2.0.7.0
Log file location : /u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/opatch/opatch2023-01-24_15-13-18PM_1.log

Verifying environment and performing prerequisite checks…
OPatch continues with these patches: 34786990

Do you want to proceed? [y|n]y
User Responded with: Y
All checks passed.

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = ‘/u01/app/oracle/product/19.0.0/dbhome_1’)

Is the local system ready for patching? [y|n]y
User Responded with: Y
Backing up files…
Applying interim patch ‘34786990’ to OH ‘/u01/app/oracle/product/19.0.0/dbhome_1’

Patching component oracle.javavm.server, 19.0.0.0.0…

Patching component oracle.javavm.server.core, 19.0.0.0.0…

Patching component oracle.rdbms.dbscripts, 19.0.0.0.0…

Patching component oracle.rdbms, 19.0.0.0.0…

Patching component oracle.javavm.client, 19.0.0.0.0…
Patch 34786990 successfully applied.
Log file location: /u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/opatch/opatch2023-01-24_15-13-18PM_1.log

OPatch succeeded.

Apply the one-off patches

29213893
33973908
34871935
34879016
34932268 —-> Before applying this patch check the permission of the file (/u01/app/oracle/product/19.0.0/dbhome_1/bin/oradism)

chown oracle /u01/app/oracle/product/19.0.0/dbhome_1/bin/oradism

Now we need to create the database

# Start the listener.

lsnrctl start

# Interactive mode.

dbca

Post Installation

Edit the “/etc/oratab” file setting the restart flag for each instance to ‘Y’.

cdb1:/u01/app/oracle/product/19.0.0/dbhome_1:Y
Enable Oracle Managed Files (OMF) and make sure the PDB starts when the instance starts.

sqlplus / as sysdba <<EOF
alter system set db_create_file_dest=’/u01/oracle/app/oradata/CDB1/pdb1′;
alter pluggable database pdb1 save state;
exit;
EOF

SQL> alter session set container=pdb1;

Session altered.

SQL>
SQL>
SQL> select username,account_status from dba_users where account_status=’OPEN’;

USERNAME
——————————————————————————–
ACCOUNT_STATUS
——————————–
SYS
OPEN

SYSTEM
OPEN

PDBADMIN
OPEN

    About Abdul Khalique Siddique

    In addition to my proficiency in Oracle Database, I have also specialized in Oracle E-Business Suite. I have hands-on experience in implementing, configuring, and maintaining EBS applications, enabling organizations to streamline their business processes and achieve operational efficiency. Also I have hands-on experience in Oracle Cloud Infrastructure (OCI). I have worked with OCI services such as compute, storage, networking, and database offerings, leveraging the power of the cloud to deliver scalable and cost-effective solutions. My knowledge of OCI architecture and deployment models allows me to design and implement robust and secure cloud environments for various business requirements. Furthermore, I have specialized in disaster recovery solutions for Oracle technologies. I have designed and implemented comprehensive disaster recovery strategies, including backup and recovery procedures, standby databases, and high availability configurations. My expertise in data replication, failover mechanisms, and business continuity planning ensures that organizations can quickly recover from disruptions and maintain uninterrupted operations.

    Check Also

    Configuring EM Express on 19c Rac Database

    Configuring EM Express on 19c Rac Database   SQL> select dbms_xdb_config.getHttpPort() from dual; DBMS_XDB_CONFIG.GETHTTPPORT()—————————–0 SQL> …

    Leave a Reply