Installation of Oracle 19c Database on Red Hat Enterprise Linux (RHEL 8.9) using Command Line

This topic explores the command-line process of installing Oracle 19c database software on a Red Hat Enterprise Linux (RHEL) system. It’s a technical procedure involving several key steps:

  1. Pre-installation setup: This includes configuring system parameters, installing required packages, and creating user accounts for running the database.
  2. Software preparation: Downloading the Oracle 19c installation package and extracting it to the designated directory.
  3. Oracle Universal Installer (OUI): Launching the OUI tool from the command line, either in interactive mode for manual configuration or silently with predefined options in a response file.
  4. Post-installation tasks: Running root scripts as prompted, potentially applying database patches, and configuring database services.

This approach offers benefits like automation and detailed control over the installation process. However, it requires familiarity with system administration and the OUI command-line options.

If you’re interested in setting up an Oracle 19c database on RHEL using the command line, this topic provides a helpful overview of the essential steps and considerations involved.

[oracle1@machine-oracle-db-standby-a ~]$ sudo dnf install -y /d1/sources/oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm gcc gcc-c++ unixODBC
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-manager to register.

Last metadata expiration check: 0:00:10 ago on Thu 14 Dec 2023 02:24:00 AM UTC.
Dependencies resolved.
=======================================================================================================================================================================================================================================
 Package                                                   Architecture                      Version                                                       Repository                                                             Size
=======================================================================================================================================================================================================================================
Installing:
 gcc                                                       x86_64                            8.5.0-20.el8                                                  rhui-rhel-8-for-x86_64-appstream-rhui-rpms                             23 M
 gcc-c++                                                   x86_64                            8.5.0-20.el8                                                  rhui-rhel-8-for-x86_64-appstream-rhui-rpms                             12 M
 oracle-database-preinstall-19c                            x86_64                            1.0-2.el8                                                     @commandline                                                           31 k
 unixODBC                                                  x86_64                            2.3.7-1.el8                                                   rhui-rhel-8-for-x86_64-appstream-rhui-rpms                            458 k
Installing dependencies:
 cpp                                                       x86_64                            8.5.0-20.el8                                                  rhui-rhel-8-for-x86_64-appstream-rhui-rpms                             10 M
 glibc-devel                                               x86_64                            2.28-236.el8.7                                                rhui-rhel-8-for-x86_64-baseos-rhui-rpms                                85 k
 glibc-headers                                             x86_64                            2.28-236.el8.7                                                rhui-rhel-8-for-x86_64-baseos-rhui-rpms                               490 k
 isl                                                       x86_64                            0.16.1-6.el8                                                  rhui-rhel-8-for-x86_64-appstream-rhui-rpms                            841 k
 kernel-headers                                            x86_64                            4.18.0-513.9.1.el8_9                                          rhui-rhel-8-for-x86_64-baseos-rhui-rpms                                11 M
 ksh                                                       x86_64                            20120801-259.el8                                              rhui-rhel-8-for-x86_64-appstream-rhui-rpms                            925 k
 libaio-devel                                              x86_64                            0.3.112-1.el8                                                 rhui-rhel-8-for-x86_64-baseos-rhui-rpms                                19 k
 libnsl                                                    x86_64                            2.28-236.el8.7                                                rhui-rhel-8-for-x86_64-baseos-rhui-rpms                               107 k
 libstdc++-devel                                           x86_64                            8.5.0-20.el8                                                  rhui-rhel-8-for-x86_64-appstream-rhui-rpms                            2.1 M
 libxcrypt-devel                                           x86_64                            4.1.1-6.el8                                                   rhui-rhel-8-for-x86_64-baseos-rhui-rpms                                25 k
 lm_sensors-libs                                           x86_64                            3.4.0-23.20180522git70f7e08.el8                               rhui-rhel-8-for-x86_64-baseos-rhui-rpms                                59 k
 make                                                      x86_64                            1:4.2.1-11.el8                                                rhui-rhel-8-for-x86_64-baseos-rhui-rpms                               498 k
 sysstat                                                   x86_64                            11.7.3-11.el8                                                 rhui-rhel-8-for-x86_64-appstream-rhui-rpms                            426 k

Transaction Summary
=======================================================================================================================================================================================================================================
Install  17 Packages

Total size: 63 M
Total download size: 63 M
Installed size: 148 M
Downloading Packages:
(1/16): unixODBC-2.3.7-1.el8.x86_64.rpm                                                                                                                                                                3.1 MB/s | 458 kB     00:00
(2/16): isl-0.16.1-6.el8.x86_64.rpm                                                                                                                                                                    5.4 MB/s | 841 kB     00:00
(3/16): gcc-c++-8.5.0-20.el8.x86_64.rpm                                                                                                                                                                 36 MB/s |  12 MB     00:00
(4/16): cpp-8.5.0-20.el8.x86_64.rpm                                                                                                                                                                     39 MB/s |  10 MB     00:00
(5/16): libstdc++-devel-8.5.0-20.el8.x86_64.rpm                                                                                                                                                         26 MB/s | 2.1 MB     00:00
(6/16): sysstat-11.7.3-11.el8.x86_64.rpm                                                                                                                                                                11 MB/s | 426 kB     00:00
(7/16): libaio-devel-0.3.112-1.el8.x86_64.rpm                                                                                                                                                          591 kB/s |  19 kB     00:00
(8/16): libxcrypt-devel-4.1.1-6.el8.x86_64.rpm                                                                                                                                                         934 kB/s |  25 kB     00:00
(9/16): gcc-8.5.0-20.el8.x86_64.rpm                                                                                                                                                                     42 MB/s |  23 MB     00:00
(10/16): lm_sensors-libs-3.4.0-23.20180522git70f7e08.el8.x86_64.rpm                                                                                                                                    472 kB/s |  59 kB     00:00
(11/16): ksh-20120801-259.el8.x86_64.rpm                                                                                                                                                               2.3 MB/s | 925 kB     00:00
(12/16): glibc-devel-2.28-236.el8.7.x86_64.rpm                                                                                                                                                         2.3 MB/s |  85 kB     00:00
(13/16): make-4.2.1-11.el8.x86_64.rpm                                                                                                                                                                   11 MB/s | 498 kB     00:00
(14/16): glibc-headers-2.28-236.el8.7.x86_64.rpm                                                                                                                                                       9.4 MB/s | 490 kB     00:00
(15/16): libnsl-2.28-236.el8.7.x86_64.rpm                                                                                                                                                              2.8 MB/s | 107 kB     00:00
(16/16): kernel-headers-4.18.0-513.9.1.el8_9.x86_64.rpm                                                                                                                                                 51 MB/s |  11 MB     00:00
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                   57 MB/s |  63 MB     00:01
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                                                               1/1
  Installing       : libstdc++-devel-8.5.0-20.el8.x86_64                                                                                                                                                                          1/17
  Installing       : kernel-headers-4.18.0-513.9.1.el8_9.x86_64                                                                                                                                                                   2/17
  Running scriptlet: glibc-headers-2.28-236.el8.7.x86_64                                                                                                                                                                          3/17
  Installing       : glibc-headers-2.28-236.el8.7.x86_64                                                                                                                                                                          3/17
  Installing       : glibc-devel-2.28-236.el8.7.x86_64                                                                                                                                                                            4/17
  Running scriptlet: glibc-devel-2.28-236.el8.7.x86_64                                                                                                                                                                            4/17
  Installing       : libxcrypt-devel-4.1.1-6.el8.x86_64                                                                                                                                                                           5/17
  Installing       : libnsl-2.28-236.el8.7.x86_64                                                                                                                                                                                 6/17
  Installing       : make-1:4.2.1-11.el8.x86_64                                                                                                                                                                                   7/17
  Running scriptlet: make-1:4.2.1-11.el8.x86_64                                                                                                                                                                                   7/17
  Installing       : lm_sensors-libs-3.4.0-23.20180522git70f7e08.el8.x86_64                                                                                                                                                       8/17
  Running scriptlet: lm_sensors-libs-3.4.0-23.20180522git70f7e08.el8.x86_64                                                                                                                                                       8/17
  Installing       : sysstat-11.7.3-11.el8.x86_64                                                                                                                                                                                 9/17
  Running scriptlet: sysstat-11.7.3-11.el8.x86_64                                                                                                                                                                                 9/17
  Installing       : libaio-devel-0.3.112-1.el8.x86_64                                                                                                                                                                           10/17
  Installing       : ksh-20120801-259.el8.x86_64                                                                                                                                                                                 11/17
  Running scriptlet: ksh-20120801-259.el8.x86_64                                                                                                                                                                                 11/17
  Installing       : cpp-8.5.0-20.el8.x86_64                                                                                                                                                                                     12/17
  Running scriptlet: cpp-8.5.0-20.el8.x86_64                                                                                                                                                                                     12/17
  Installing       : isl-0.16.1-6.el8.x86_64                                                                                                                                                                                     13/17
  Running scriptlet: isl-0.16.1-6.el8.x86_64                                                                                                                                                                                     13/17
  Installing       : gcc-8.5.0-20.el8.x86_64                                                                                                                                                                                     14/17
  Running scriptlet: gcc-8.5.0-20.el8.x86_64                                                                                                                                                                                     14/17
  Installing       : gcc-c++-8.5.0-20.el8.x86_64                                                                                                                                                                                 15/17
  Running scriptlet: oracle-database-preinstall-19c-1.0-2.el8.x86_64                                                                                                                                                             16/17
  Installing       : oracle-database-preinstall-19c-1.0-2.el8.x86_64                                                                                                                                                             16/17
  Installing       : unixODBC-2.3.7-1.el8.x86_64                                                                                                                                                                                 17/17
  Running scriptlet: unixODBC-2.3.7-1.el8.x86_64                                                                                                                                                                                 17/17
  Running scriptlet: oracle-database-preinstall-19c-1.0-2.el8.x86_64                                                                                                                                                             17/17
  Running scriptlet: unixODBC-2.3.7-1.el8.x86_64                                                                                                                                                                                 17/17
  Verifying        : unixODBC-2.3.7-1.el8.x86_64                                                                                                                                                                                  1/17
  Verifying        : isl-0.16.1-6.el8.x86_64                                                                                                                                                                                      2/17
  Verifying        : gcc-c++-8.5.0-20.el8.x86_64                                                                                                                                                                                  3/17
  Verifying        : cpp-8.5.0-20.el8.x86_64                                                                                                                                                                                      4/17
  Verifying        : gcc-8.5.0-20.el8.x86_64                                                                                                                                                                                      5/17
  Verifying        : ksh-20120801-259.el8.x86_64                                                                                                                                                                                  6/17
  Verifying        : libstdc++-devel-8.5.0-20.el8.x86_64                                                                                                                                                                          7/17
  Verifying        : sysstat-11.7.3-11.el8.x86_64                                                                                                                                                                                 8/17
  Verifying        : libaio-devel-0.3.112-1.el8.x86_64                                                                                                                                                                            9/17
  Verifying        : libxcrypt-devel-4.1.1-6.el8.x86_64                                                                                                                                                                          10/17
  Verifying        : lm_sensors-libs-3.4.0-23.20180522git70f7e08.el8.x86_64                                                                                                                                                      11/17
  Verifying        : make-1:4.2.1-11.el8.x86_64                                                                                                                                                                                  12/17
  Verifying        : glibc-devel-2.28-236.el8.7.x86_64                                                                                                                                                                           13/17
  Verifying        : glibc-headers-2.28-236.el8.7.x86_64                                                                                                                                                                         14/17
  Verifying        : libnsl-2.28-236.el8.7.x86_64                                                                                                                                                                                15/17
  Verifying        : kernel-headers-4.18.0-513.9.1.el8_9.x86_64                                                                                                                                                                  16/17
  Verifying        : oracle-database-preinstall-19c-1.0-2.el8.x86_64                                                                                                                                                             17/17
Installed products updated.

Installed:
  cpp-8.5.0-20.el8.x86_64               gcc-8.5.0-20.el8.x86_64                      gcc-c++-8.5.0-20.el8.x86_64                              glibc-devel-2.28-236.el8.7.x86_64   glibc-headers-2.28-236.el8.7.x86_64
  isl-0.16.1-6.el8.x86_64               kernel-headers-4.18.0-513.9.1.el8_9.x86_64   ksh-20120801-259.el8.x86_64                              libaio-devel-0.3.112-1.el8.x86_64   libnsl-2.28-236.el8.7.x86_64
  libstdc++-devel-8.5.0-20.el8.x86_64   libxcrypt-devel-4.1.1-6.el8.x86_64           lm_sensors-libs-3.4.0-23.20180522git70f7e08.el8.x86_64   make-1:4.2.1-11.el8.x86_64          oracle-database-preinstall-19c-1.0-2.el8.x86_64
  sysstat-11.7.3-11.el8.x86_64          unixODBC-2.3.7-1.el8.x86_64

Complete!

[oracle1@machine-oracle-db-standby-a ~]$ sudo grep -i memt /proc/meminfo; sudo grep -i swapt /proc/meminfo;
MemTotal:       16123824 kB
SwapTotal:      16777212 kB

[oracle1@machine-oracle-db-standby-a ~]$ hostnamectl
   Static hostname: localhost.localdomain
Transient hostname: machine-oracle-db-standby-a
         Icon name: computer-vm
           Chassis: vm
        Machine ID: ac72d83e67dd8e8709b26855cf7079ec
           Boot ID: a08af3469d434b53aa1722cae001db11
    Virtualization: kvm
  Operating System: Red Hat Enterprise Linux 8.9 (Ootpa)
       CPE OS Name: cpe:/o:redhat:enterprise_linux:8::baseos
            Kernel: Linux 4.18.0-513.9.1.el8_9.x86_64
      Architecture: x86-64

[oracle1@machine-oracle-db-standby-a ~]$ sudo dmidecode -t system
# dmidecode 3.3
Getting SMBIOS data from sysfs.
SMBIOS 2.4 present.

Handle 0x0097, DMI type 1, 27 bytes
System Information
        Manufacturer: Google
        Product Name: Google Compute Engine
        Version: Not Specified
        Serial Number: GoogleCloud-387583CF4B3808271B29A0617F0964C4
        UUID: 387583cf-4b38-0827-1b29-a0617f0964c4
        Wake-up Type: Power Switch
        SKU Number: Not Specified
        Family: Not Specified

Handle 0x0100, DMI type 32, 11 bytes
System Boot Information
        Status: No errors detected

[oracle1@machine-oracle-db-standby-a ~]$ sudo lscpu
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              4
On-line CPU(s) list: 0-3
Thread(s) per core:  2
Core(s) per socket:  2
Socket(s):           1
NUMA node(s):        1
Vendor ID:           GenuineIntel
BIOS Vendor ID:      Google
CPU family:          6
Model:               85
Model name:          Intel(R) Xeon(R) CPU @ 2.80GHz
Stepping:            7
CPU MHz:             2800.276
BogoMIPS:            5600.55
Hypervisor vendor:   KVM
Virtualization type: full
L1d cache:           32K
L1i cache:           32K
L2 cache:            1024K
L3 cache:            33792K
NUMA node0 CPU(s):   0-3
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves arat avx512_vnni md_clear arch_capabilities
[oracle1@machine-oracle-db-standby-a ~]$ sudo lscpu
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              4
On-line CPU(s) list: 0-3
Thread(s) per core:  2
Core(s) per socket:  2
Socket(s):           1
NUMA node(s):        1
Vendor ID:           GenuineIntel
BIOS Vendor ID:      Google
CPU family:          6
Model:               85
Model name:          Intel(R) Xeon(R) CPU @ 2.80GHz
Stepping:            7
CPU MHz:             2800.276
BogoMIPS:            5600.55
Hypervisor vendor:   KVM
Virtualization type: full
L1d cache:           32K
L1i cache:           32K
L2 cache:            1024K
L3 cache:            33792K
NUMA node0 CPU(s):   0-3
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves arat avx512_vnni md_clear arch_capabilities

[oracle1@machine-oracle-db-standby-a ~]$ sudo cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
172.16.236.11 machine-oracle-db-standby-a.asia-southeast2-a.c.legacy-db-402905.internal machine-oracle-db-standby-a  # Added by Google
169.254.169.254 metadata.google.internal  # Added by Google

[oracle1@machine-oracle-db-standby-a ~]$ sudo vi /etc/security/limits.d/oracle-database-preinstall-19c.conf; cat /etc/security/limits.d/oracle-database-preinstall-19c.conf;

# oracle-database-preinstall-19c setting for nofile soft limit is 1024
applmgr   soft   nofile    1024

# oracle-database-preinstall-19c setting for nofile hard limit is 65536
applmgr   hard   nofile    65536

# oracle-database-preinstall-19c setting for nproc soft limit is 16384
# refer orabug15971421 for more info.
applmgr   soft   nproc    16384

# oracle-database-preinstall-19c setting for nproc hard limit is 16384
applmgr   hard   nproc    16384

# oracle-database-preinstall-19c setting for stack soft limit is 10240KB
applmgr   soft   stack    10240

# oracle-database-preinstall-19c setting for stack hard limit is 32768KB
applmgr   hard   stack    32768

# oracle-database-preinstall-19c setting for memlock hard limit is maximum of 128GB on x86_64 or 3GB on x86 OR 90 % of RAM
applmgr   hard   memlock    14511442

# oracle-database-preinstall-19c setting for memlock soft limit is maximum of 128GB on x86_64 or 3GB on x86 OR 90% of RAM
applmgr   soft   memlock    14511442

# oracle-database-preinstall-19c setting for data soft limit is 'unlimited'
applmgr   soft   data    unlimited

# oracle-database-preinstall-19c setting for data hard limit is 'unlimited'
applmgr   hard   data    unlimited

[oracle1@machine-oracle-db-standby-a ~]$ sudo vi /etc/sysctl.d/99-oracle-database-preinstall-19c-sysctl.conf; cat /etc/sysctl.d/99-oracle-database-preinstall-19c-sysctl.conf; sudo sysctl -p /etc/sysctl.d/99-oracle-database-preinstall-19c-sysctl.conf;
# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
#
# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.
#
# For more information, see sysctl.conf(5) and sysctl.d(5).

# oracle-database-preinstall-19c setting for fs.file-max is 6815744
fs.file-max = 6815744

# oracle-database-preinstall-19c setting for kernel.sem is '250 32000 100 128'
kernel.sem = 250 32000 100 128

# oracle-database-preinstall-19c setting for kernel.shmmni is 4096
kernel.shmmni = 4096

# oracle-database-preinstall-19c setting for kernel.shmall is 1073741824 on x86_64
kernel.shmall = 1073741824

# oracle-database-preinstall-19c setting for kernel.shmmax is 4398046511104 on x86_64
kernel.shmmax = 11557557043

# oracle-database-preinstall-19c setting for kernel.panic_on_oops is 1 per Orabug 19212317
kernel.panic_on_oops = 1

# oracle-database-preinstall-19c setting for net.core.rmem_default is 262144
net.core.rmem_default = 262144

# oracle-database-preinstall-19c setting for net.core.rmem_max is 4194304
net.core.rmem_max = 4194304

# oracle-database-preinstall-19c setting for net.core.wmem_default is 262144
net.core.wmem_default = 262144

# oracle-database-preinstall-19c setting for net.core.wmem_max is 1048576
net.core.wmem_max = 1048576

# oracle-database-preinstall-19c setting for net.ipv4.conf.all.rp_filter is 2
# net.ipv4.conf.all.rp_filter = 2

# oracle-database-preinstall-19c setting for net.ipv4.conf.default.rp_filter is 2
# net.ipv4.conf.default.rp_filter = 2

# oracle-database-preinstall-19c setting for fs.aio-max-nr is 1048576
fs.aio-max-nr = 1048576

# oracle-database-preinstall-19c setting for net.ipv4.ip_local_port_range is 9000 65500
# net.ipv4.ip_local_port_range = 9000 65500
vm.swappiness = 1
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 11557557043
kernel.panic_on_oops = 1
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
# net.ipv4.conf.all.rp_filter = 2
# net.ipv4.conf.default.rp_filter = 2
fs.aio-max-nr = 1048576
# net.ipv4.ip_local_port_range = 9000 65500
vm.swappiness = 1

[oracle1@machine-oracle-db-standby-a ~]$ sudo vi /etc/selinux/config; sudo 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=permissive
# 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


[oracle1@machine-oracle-db-standby-a ~]$ sudo getenforce
Enforcing
[oracle1@machine-oracle-db-standby-a ~]$ sudo setenforce 0
[oracle1@machine-oracle-db-standby-a ~]$ sudo getenforce
Permissive
[oracle1@machine-oracle-db-standby-a ~]$ sudo useradd -u 54322 -g oinstall -G oinstall,dba,oper,backupdba,dgdba,kmdba,racdba applmgr
[oracle1@machine-oracle-db-standby-a ~]$ sudo id applmgr
uid=54322(applmgr) gid=54321(oinstall) groups=54321(oinstall),54322(dba),54323(oper),54324(backupdba),54325(dgdba),54326(kmdba),54330(racdba)
[oracle1@machine-oracle-db-standby-a ~]$ sudo passwd applmgr
Changing password for user applmgr.
New password: putyourpasswordhere
Retype new password: putyourpasswordhere
passwd: all authentication tokens updated successfully.

[oracle1@machine-oracle-db-standby-a ~]$ sudo su - applmgr
[applmgr@machine-oracle-db-standby-a ~]$ pwd
/home/applmgr
[applmgr@machine-oracle-db-standby-a ~]$ vi db_profile.env; cat db_profile.env;
# Oracle Settings
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_HOSTNAME=$HOSTNAME
export ORACLE_BASE=/d1/applmgr
export ORACLE_HOME=/d1/applmgr/proddb/19c
export ORACLE_SID=CPROD
export ORACLE_TERM=xterm
export JAVA_HOME=$ORACLE_HOME/jdk
export BASE_PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$JAVA_HOME/bin:$BASE_PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export NLS_DATE_FORMAT='DD-Mon-RR HH24:MI:SS'
export HISTTIMEFORMAT="%Y-%m-%d %T ~ "
umask 022
[applmgr@machine-oracle-db-standby-a ~]$ ls -lh ~/db*
-rw-r--r--. 1 applmgr oinstall 555 Dec 14 03:00 /home/applmgr/db_profile.env
[applmgr@machine-oracle-db-standby-a ~]$ vi .bash_profile; cat .bash_profile;
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs
. /home/applmgr/db_profile.env
[applmgr@machine-oracle-db-standby-a ~]$ exit
logout
[oracle1@machine-oracle-db-standby-a ~]$ sudo su - applmgr
Last login: Thu Dec 14 02:57:16 UTC 2023 on pts/0
[applmgr@machine-oracle-db-standby-a ~]$ env|grep ORA
ORACLE_SID=CPROD
ORACLE_BASE=/d1/applmgr
ORACLE_HOME=/d1/applmgr/proddb/19c
ORACLE_TERM=xterm
ORACLE_HOSTNAME=machine-oracle-db-standby-a
[applmgr@machine-oracle-db-standby-a ~]$ cat $ORACLE_HOME/network/admin/listener.ora
# listener.ora Network Configuration File: /d1/applmgr/proddb/19c/network/admin/listener.ora
# Generated by Oracle configuration tools.

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = machine-oracle-db-standby-01)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

[applmgr@machine-oracle-db-standby-a ~]$ vi $ORACLE_HOME/network/admin/listener.ora
[applmgr@machine-oracle-db-standby-a ~]$ cat $ORACLE_HOME/network/admin/listener.ora
# listener.ora Network Configuration File: /d1/applmgr/proddb/19c/network/admin/listener.ora
# Generated by Oracle configuration tools.

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = machine-oracle-db-standby-a)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

[applmgr@machine-oracle-db-standby-a ~]$ cat $ORACLE_HOME/network/admin/tnsnames.ora
# tnsnames.ora Network Configuration File: /d1/applmgr/proddb/19c/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

LISTENER_CPROD =
  (ADDRESS = (PROTOCOL = TCP)(HOST = machine-oracle-db-standby-01)(PORT = 1521))


CPROD =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = machine-oracle-db-standby-01)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = CPROD)
    )
  )
PROD =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = machine-oracle-db-standby-01)(PORT = 1521))
    (CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = prod)(UR = A))
  )
[applmgr@machine-oracle-db-standby-a ~]$ vi $ORACLE_HOME/network/admin/tnsnames.ora
[applmgr@machine-oracle-db-standby-a ~]$ cat $ORACLE_HOME/network/admin/tnsnames.ora
# tnsnames.ora Network Configuration File: /d1/applmgr/proddb/19c/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

LISTENER_CPROD =
  (ADDRESS = (PROTOCOL = TCP)(HOST = machine-oracle-db-standby-a)(PORT = 1521))
CPROD =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = machine-oracle-db-standby-a)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = CPROD)
    )
  )
PROD =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = machine-oracle-db-standby-a)(PORT = 1521))
    (CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = prod)(UR = A))
  )

[applmgr@machine-oracle-db-standby-a ~]$ cd /d1/oraInventory; ls -lh;
total 24K
drwxrwx---. 3 applmgr oinstall 4.0K Nov 19 04:19 backup
drwxrwx---. 2 applmgr oinstall 4.0K Nov 16 04:42 ContentsXML
drwxrwx---. 3 applmgr oinstall 4.0K Nov 19 04:23 logs
-rw-rw----. 1 applmgr oinstall   51 Nov 16 04:42 oraInst.loc
-rwxrwx---. 1 applmgr oinstall 1.6K Nov 16 04:42 orainstRoot.sh
drwxrwx---. 2 applmgr oinstall 4.0K Nov 19 04:11 oui

[applmgr@machine-oracle-db-standby-a oraInventory]$ zip -r9 ../oraInventory_20231214.10.08.zip *
  adding: backup/ (stored 0%)
  adding: backup/2023-11-19_03-28-07AM/ (stored 0%)
  adding: backup/2023-11-19_03-28-07AM/ContentsXML/ (stored 0%)
  adding: backup/2023-11-19_03-28-07AM/ContentsXML/oui-patch.xml (deflated 12%)
  adding: backup/2023-11-19_03-28-07AM/ContentsXML/comps.xml (deflated 34%)
  adding: backup/2023-11-19_03-28-07AM/ContentsXML/inventory.xml (deflated 34%)
  adding: backup/2023-11-19_03-28-07AM/ContentsXML/libs.xml (deflated 33%)
  adding: ContentsXML/ (stored 0%)
  adding: ContentsXML/oui-patch.xml (deflated 12%)
  adding: ContentsXML/comps.xml (deflated 37%)
  adding: ContentsXML/inventory.xml (deflated 41%)
  adding: ContentsXML/libs.xml (deflated 33%)
  adding: logs/ (stored 0%)
  adding: logs/installActions2023-11-19_03-28-07AM.log (deflated 94%)
  adding: logs/oraInstall2023-11-19_03-28-07AM.out (stored 0%)
  adding: logs/oraInstall2023-11-19_03-28-07AM.err (deflated 73%)
  adding: logs/time2023-11-19_03-28-07AM.log (deflated 9%)
  adding: logs/InstallActions2023-11-16_04-27-09AM/ (stored 0%)
  adding: logs/InstallActions2023-11-16_04-27-09AM/installActions2023-11-16_04-27-09AM.log (deflated 95%)
  adding: logs/InstallActions2023-11-16_04-27-09AM/time2023-11-16_04-27-09AM.log (deflated 88%)
  adding: logs/InstallActions2023-11-16_04-27-09AM/installActions2023-11-16_04-27-09AM.out (deflated 94%)
  adding: logs/InstallActions2023-11-16_04-27-09AM/installActions2023-11-16_04-27-09AM.err (stored 0%)
  adding: logs/InstallActions2023-11-16_04-27-09AM/oraInstall2023-11-16_04-27-09AM.err (stored 0%)
  adding: logs/InstallActions2023-11-16_04-27-09AM/installerPatchActions_2023-11-16_04-27-09AM.log (deflated 81%)
  adding: logs/InstallActions2023-11-16_04-27-09AM/oraInstall2023-11-16_04-27-09AM.out (deflated 28%)
  adding: logs/installActions2023-11-19_04-23-13AM.log (deflated 81%)
  adding: oraInst.loc (deflated 14%)
  adding: orainstRoot.sh (deflated 59%)
  adding: oui/ (stored 0%)
  adding: oui/srcs.lst (deflated 34%)

[applmgr@machine-oracle-db-standby-a oraInventory]$ rm -fr *
[applmgr@machine-oracle-db-standby-a oraInventory]$ ls -lah
total 8.0K
drwxrwx---. 2 applmgr oinstall 4.0K Dec 14 03:08 .
drwxrwxr-x. 6 applmgr oinstall 4.0K Dec 14 03:08 ..

[applmgr@machine-oracle-db-standby-a oraInventory]$ cd $ORACLE_HOME/dbs
[applmgr@machine-oracle-db-standby-a dbs]$ ls -lh
total 23M
-rw-rw----. 1 applmgr oinstall 1.6K Nov 28 15:34 hc_CPROD.dat
-rw-r--r--. 1 applmgr oinstall 3.1K May 14  2015 init.ora
-rw-r-----. 1 applmgr oinstall   24 Nov 20 15:29 lkCPROD
-rw-r-----. 1 applmgr oinstall 2.0K Nov 20 15:30 orapwCPROD
-rw-r-----. 1 applmgr oinstall  23M Nov 28 13:39 snapcf_CPROD.f
-rw-r-----. 1 applmgr oinstall 3.5K Nov 25 23:00 spfileCPROD.ora

[applmgr@machine-oracle-db-standby-a dbs]$ zip -r9 ../dbs_20231214.10.09.zip *
  adding: hc_CPROD.dat (deflated 92%)
  adding: init.ora (deflated 52%)
  adding: lkCPROD (stored 0%)
  adding: orapwCPROD (deflated 89%)
  adding: snapcf_CPROD.f (deflated 99%)
  adding: spfileCPROD.ora (deflated 79%)

[applmgr@machine-oracle-db-standby-a dbs]$ cd ../rdbms/lib; pwd;
/d1/applmgr/proddb/19c/rdbms/lib

[applmgr@machine-oracle-db-standby-a lib]$ grep -i define config.c
/*  SS_DBA_GRP defines the UNIX group ID for sqldba adminstrative access.  */
#define SS_DBA_GRP "dba"
#define SS_OPER_GRP "oper"
#define SS_ASM_GRP ""
#define SS_BKP_GRP "backupdba"
#define SS_DGD_GRP "dgdba"
#define SS_KMT_GRP "kmdba"
#define SS_RAC_GRP "racdba"

[applmgr@machine-oracle-db-standby-a lib]$ cd ../../perl/bin; pwd;
/d1/applmgr/proddb/19c/perl/bin
[applmgr@machine-oracle-db-standby-a bin]$ ./perl $ORACLE_HOME/clone/bin/clone.pl ORACLE_BASE="/d1/applmgr" ORACLE_HOME="/d1/applmgr/proddb/19c" OSDBA_GROUP=dba OSOPER_GROUP=oper OSBACKUPDBA_GROUP=backupdba OSDGDBA_GROUP=dgdba OSKMDBA_GROUP=kmdba OSRACDBA_GROUP=racdba -defaultHomeName

[INFO] [INS-32183] Use of clone.pl is deprecated in this release. Clone operation is equivalent to performing a Software Only installation from the image.
You must use /d1/applmgr/proddb/19c/runInstaller script available to perform the Software Only install. For more details on image based installation, refer to help documentation.

Starting Oracle Universal Installer...

..................................................   5% Done.
..................................................   10% Done.
..................................................   15% Done.
..................................................   20% Done.
..................................................   25% Done.
..................................................   30% Done.
..................................................   35% Done.
..................................................   40% Done.
..................................................   45% Done.
..................................................   50% Done.
..................................................   55% Done.
..................................................   60% Done.
..................................................   65% Done.
..................................................   70% Done.
..................................................   75% Done.
..................................................   80% Done.
..................................................   85% Done.
..........
Copy files in progress.

Copy files successful.

Link binaries in progress.
..........
Link binaries successful.

Setup files in progress.
..........
Setup files successful.

Setup Inventory in progress.

Setup Inventory successful.
..........
Finish Setup successful.
The cloning of OraHome1 was successful.
Please check '/home/applmgr/oraInventory/logs/cloneActions2023-12-14_03-27-39AM.log' for more details.

Setup Oracle Base in progress.

Setup Oracle Base successful.
..................................................   95% Done.

As a root user, execute the following script(s):
        1. /home/applmgr/oraInventory/orainstRoot.sh
        2. /d1/applmgr/proddb/19c/root.sh



..................................................   100% Done.

[applmgr@machine-oracle-db-standby-a bin]$ exit
logout
[oracle1@machine-oracle-db-standby-a ~]$ sudo su -

[root@machine-oracle-db-standby-a ~]# cd /home/applmgr/oraInventory; ./orainstRoot.sh
Changing permissions of /home/applmgr/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /home/applmgr/oraInventory to oinstall.
The execution of the script is complete.

[root@machine-oracle-db-standby-a oraInventory]# cd /d1/applmgr/proddb/19c; ./root.sh
Check /d1/applmgr/proddb/19c/install/root_machine-oracle-db-standby-a_2023-12-14_03-31-14-705476934.log for the output of root script
[root@machine-oracle-db-standby-a 19c]# cat /d1/applmgr/proddb/19c/install/root_machine-oracle-db-standby-a_2023-12-14_03-31-14-705476934.log
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= applmgr
    ORACLE_HOME=  /d1/applmgr/proddb/19c
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.

[root@machine-oracle-db-standby-a ~]# cat /etc/oraInst.loc
inventory_loc=/home/applmgr/oraInventory
inst_group=oinstall
[root@machine-oracle-db-standby-a ~]# ls -lh /etc/oraInst.loc
-rw-r--r--. 1 root root 61 Dec 14 03:31 /etc/oraInst.loc
[root@machine-oracle-db-standby-a ~]# vi /etc/oraInst.loc
[root@machine-oracle-db-standby-a ~]# cat /etc/oraInst.loc
#inventory_loc=/home/applmgr/oraInventory
inventory_loc=/d1/oraInventory
inst_group=oinstall
[root@machine-oracle-db-standby-a ~]# exit
logout

[oracle1@machine-oracle-db-standby-a ~]$ sudo su - applmgr
Last login: Thu Dec 14 03:31:45 UTC 2023 on pts/0
[applmgr@machine-oracle-db-standby-a ~]$ cd oraInventory/
[applmgr@machine-oracle-db-standby-a oraInventory]$ rsync -vrah * /d1/oraInventory/
sending incremental file list
oraInst.loc
orainstRoot.sh
ContentsXML/
ContentsXML/comps.xml
ContentsXML/inventory.xml
ContentsXML/libs.xml
ContentsXML/oui-patch.xml
logs/
logs/cloneActions2023-12-14_03-27-39AM.log
logs/oraInstall2023-12-14_03-27-39AM.err
logs/oraInstall2023-12-14_03-27-39AM.out
logs/silentInstall2023-12-14_03-27-39AM.log
logs/time2023-12-14_03-27-39AM.log

sent 10.35M bytes  received 245 bytes  20.70M bytes/sec
total size is 10.35M  speedup is 1.00

[applmgr@machine-oracle-db-standby-a oraInventory]$ $ORACLE_HOME/OPatch/opatch lspatches
35655527;OCW RELEASE UPDATE 19.21.0.0.0 (35655527)
35643107;Database Release Update : 19.21.0.0.231017 (35643107)

OPatch succeeded.
[applmgr@machine-oracle-db-standby-a oraInventory]$ cd
[applmgr@machine-oracle-db-standby-a ~]$ cat /etc/oratab
#



# This file is used by ORACLE utilities.  It is created by root.sh
# and updated by either Database Configuration Assistant while creating
# a database or ASM Configuration Assistant while creating ASM instance.

# A colon, ':', is used as the field terminator.  A new line terminates
# the entry.  Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
#   $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively.  The third field indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#

[applmgr@machine-oracle-db-standby-a ~]$ echo $ORACLE_SID:$ORACLE_HOME:Y
CPROD:/d1/applmgr/proddb/19c:Y
[applmgr@machine-oracle-db-standby-a ~]$ echo $ORACLE_SID:$ORACLE_HOME:Y >> /etc/oratab
[applmgr@machine-oracle-db-standby-a ~]$ tail -2 /etc/oratab
#
CPROD:/d1/applmgr/proddb/19c:Y
[applmgr@machine-oracle-db-standby-a ~]$ lsnrctl start listener; sqlplus / as sysdba;

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 14-DEC-2023 03:46:41

Copyright (c) 1991, 2023, Oracle.  All rights reserved.

Starting /d1/applmgr/proddb/19c/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 19.0.0.0.0 - Production
System parameter file is /d1/applmgr/proddb/19c/network/admin/listener.ora
Log messages written to /d1/applmgr/diag/tnslsnr/machine-oracle-db-standby-a/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=machine-oracle-db-standby-a.asia-southeast2-a.c.legacy-db-402905.internal)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=machine-oracle-db-standby-a)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     listener
Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date                14-DEC-2023 03:46:41
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /d1/applmgr/proddb/19c/network/admin/listener.ora
Listener Log File         /d1/applmgr/diag/tnslsnr/machine-oracle-db-standby-a/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=machine-oracle-db-standby-a.asia-southeast2-a.c.legacy-db-402905.internal)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully


SQL*Plus: Release 19.0.0.0.0 - Production on Thu Dec 14 03:46:41 2023
Version 19.21.0.0.0

Copyright (c) 1982, 2022, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup nomount;
ORACLE instance started.

Total System Global Area 8589930664 bytes
Fixed Size                  9191592 bytes
Variable Size            1761607680 bytes
Database Buffers         6811549696 bytes
Redo Buffers                7581696 bytes

SQL> alter database mount;

Database altered.

SQL> alter database open;

Database altered.

SQL> sho pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 PROD                           READ WRITE NO
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.21.0.0.0

[applmgr@machine-oracle-db-standby-a ~]$ ps -ef|grep pmon; ps -ef|grep tnsl;
applmgr   129810       1  0 03:46 ?        00:00:00 ora_pmon_CPROD
applmgr   130300  129535  0 03:50 pts/0    00:00:00 grep --color=auto pmon
applmgr   129803       1  0 03:46 ?        00:00:00 /d1/applmgr/proddb/19c/bin/tnslsnr listener -inherit
applmgr   130302  129535  0 03:50 pts/0    00:00:00 grep --color=auto tnsl

[applmgr@machine-oracle-db-standby-a ~]$ dbshut $ORACLE_HOME
Processing Database instance "CPROD": log file /d1/applmgr/proddb/19c/rdbms/log/shutdown.log

[applmgr@machine-oracle-db-standby-a ~]$ ps -ef|grep pmon; ps -ef|grep tnsl;
applmgr   130426  129535  0 03:51 pts/0    00:00:00 grep --color=auto pmon
applmgr   130428  129535  0 03:51 pts/0    00:00:00 grep --color=auto tnsl
[applmgr@machine-oracle-db-standby-a ~]$ exit
logout

[oracle1@machine-oracle-db-standby-a ~]$ sudo systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2023-12-13 15:13:52 UTC; 12h ago
     Docs: man:firewalld(1)
 Main PID: 728 (firewalld)
    Tasks: 3 (limit: 100518)
   Memory: 55.8M
   CGroup: /system.slice/firewalld.service
           └─728 /usr/libexec/platform-python -s /usr/sbin/firewalld --nofork --nopid

Dec 13 15:13:51 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
Dec 13 15:13:52 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
Dec 13 15:13:52 localhost.localdomain firewalld[728]: WARNING: AllowZoneDrifting is enabled. This is considered an insecure configuration option. It will be removed in a future release. Please consider disabling it now.
Dec 14 02:17:02 machine-oracle-db-standby-a firewalld[728]: WARNING: AllowZoneDrifting is enabled. This is considered an insecure configuration option. It will be removed in a future release. Please consider disabling it now.
Dec 14 02:17:12 machine-oracle-db-standby-a firewalld[728]: WARNING: AllowZoneDrifting is enabled. This is considered an insecure configuration option. It will be removed in a future release. Please consider disabling it now.

[oracle1@machine-oracle-db-standby-a ~]$ sudo firewall-cmd --zone=public --add-port=1521/tcp --permanent
success
[oracle1@machine-oracle-db-standby-a ~]$ sudo firewall-cmd --zone=public --add-port=22/tcp --permanent
success
[oracle1@machine-oracle-db-standby-a ~]$ sudo firewall-cmd --reload
success
[oracle1@machine-oracle-db-standby-a ~]$

You may also like...

Leave a Reply

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