Install Oracle DB 19c

This section provides installation steps for Oracle DB 19c.

Pre-Installation Steps

Ensure that the following prerequisites are completed before starting the Oracle 19c installation on RHEL 8.x.

Setting Up a Virtual Machine

Before you begin

Hardware requirements for the virtual machine:

Hard Disk

200 GB (Minimum 120 GB)

Memory

16 GB (Minimum 4 GB)

vCPU

4

Procedure


Step 1

Deploy the virtual machine with RHEL ISO file (example: rhel-8.5-x86_64-dvd.iso).

Step 2

Run the following commands to activate YUM or DNF from the local repository. For more information, see Configuring YUM.

  1. To mount the CD-ROM ISO contents on an ESXi VM, ensure that the Datastore_ISO_File is selected and in connected state in the Edit_Settings of the VM instance (Mounting CD-ROM on CentOS).

  2. mount /dev/cdrom /mnt

  3. mkdir /Package

  4. cp -rv /mnt/* /Package

  5. cp -v /Package/media.repo /etc/yum.repos.d/rhel8.repo

  6. chmod 644 /etc/yum.repos.d/rhel8.repo

    Add repository entries in the /etc/yum.repos.d/rhel8.repo file.

    [root@fnd-rhel8-33 ~]# vim /etc/yum.repos.d/rhel8.repo
    [InstallMedia-BaseOS]
    name=Red Hat Enterprise Linux 8 – BaseOS
    metadata_expire=-1
    gpgcheck=1
    enabled=1
    baseurl=file:file:///Package/BaseOS/
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
    
    [InstallMedia-AppStream]
    name=Red Hat Enterprise Linux 8 – AppStream
    metadata_expire=-1
    gpgcheck=1
    enabled=1
    baseurl=file:///Package/AppStream/
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
  7. yum clean all

  8. subscription-manager clean

  9. yum repolist

  10. To prevent the following message, go to /etc/yum/pluginconf.d/subscription-manager.conf and change the parameter “enabled=1” to “enabled=0”

    “This system is not registered with Red Hat Subscription Management. You can use the subscription-manager to register.”

    # vim /etc/yum/pluginconf.d/subscription-manager.conf
    
    [main]
    
    enabled=0
  11. Run yum install nginx to confirm YUM.


What to do next

Oracle Prerequisites

Oracle Prerequisites

Before you begin

Setting Up a Virtual Machine

Procedure


Step 1

Login as a root user to create a "dba" group and "Oracle" user.

  1. groupadd dba

  2. adduser -d /home/oracle -g dba -s /bin/bash oracle

Step 2

Create the following directories to install the Oracle software.

  1. mkdir -p /home/oracle/app/oracle/product/19.0.0/dbhome_1

  2. chown -R oracle:dba /home/oracle/app/oracle/product/19.0.0/dbhome_1

  3. chmod -R 775 /home/oracle/app/oracle/product/19.0.0/dbhome_1

Step 3

Download Oracle software.

  1. Log in as a root user and save the zip file in a directory (example: mkdir /usr/programs, choosing the directory is your choice).

    LINUX.X64_193000_db_home.zip (Oracle19.3_EntEditionLinux_x86-64).

Step 4

Manual set up to install Oracle 19c. For more information, see Manual setup instructions.

  1. Add the following lines to either "/etc/sysctl.conf" or "/etc/sysctl.d/98-oracle.conf" file.

    [root@fnd-rhel8-33 ~]# vim /etc/sysctl.conf
    fs.file-max = 6815744
    
    kernel.sem = 250 32000 100 128
    
    kernel.shmmni = 4096
    
    kernel.shmall = 1073741824
    
    kernel.shmmax = 4398046511104
    
    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
    
  2. To change the current kernel parameters, run the following command, which depends on the file you edited in the above step.

    /sbin/sysctl -p

    (or)

    /sbin/sysctl -p /etc/sysctl.d/98-oracle.conf
  3. Add the following lines to the "/etc/security/limits.d/oracle-database-preinstall-19c.conf" file.

    [root@fnd-rhel8-33 ~]# vim /etc/security/limits.d/oracle-database-preinstall-19c.conf
    oracle   soft   nofile    1024
    
    oracle   hard   nofile    65536
    
    oracle   soft   nproc    16384
    
    oracle   hard   nproc    16384
    
    oracle   soft   stack    10240
    
    oracle   hard   stack    32768
    
    oracle   hard   memlock    134217728
    
    oracle   soft   memlock    134217728
    
  4. Install the pre-install packages.

    Note

     

    Some files in the package may not get installed, you can skip them as it may not stop the installation of the rest of the pre-install package.

    dnf install -y bc
    
    dnf install -y binutils
    
    **** dnf install -y compat-libstdc++-33
    
    dnf install -y elfutils-libelf
    
    dnf install -y elfutils-libelf-devel
    
    dnf install -y fontconfig-devel
    
    dnf install -y glibc
    
    dnf install -y glibc-devel
    
    dnf install -y ksh
    
    dnf install -y libaio
    
    dnf install -y libaio-devel
    
    dnf install -y libXrender
    
    dnf install -y libXrender-devel
    
    dnf install -y libX11
    
    dnf install -y libXau
    
    dnf install -y libXi
    
    dnf install -y libXtst
    
    dnf install -y libgcc
    
    dnf install -y librdmacm-devel
    
    dnf install -y libstdc++
    
    dnf install -y libstdc++-devel
    
    dnf install -y libxcb
    
    dnf install -y make
    
    # dnf install -y net-tools # Clusterware
    
    # dnf install -y nfs-utils # ACFS
    
    # dnf install -y python # ACFS
    
    # dnf install -y python-configshell # ACFS
    
    # dnf install -y python-rtslib # ACFS
    
    # dnf install -y python-six # ACFS
    
    # dnf install -y targetcli # ACFS
    
    dnf install -y smartmontools
    
    dnf install -y sysstat
    
    dnf install -y unixODBC
    
    # New for OL8
    
    dnf install -y libnsl
    
    dnf install -y libnsl.i686
    
    dnf install -y libnsl2
    
    dnf install -y libnsl2.i686
    
    
  5. Create new groups and users.

    groupadd -g 54321 oinstall
    
    groupadd -g 54322 dba
    
    groupadd -g 54323 oper
    
    useradd -u 54321 -g oinstall -G dba,oper oracle
    
  6. Set secure Linux to permissive mode by editing the "/etc/selinux/config" file.

    Ensure that the SELINUX flag is set as follows:
    1. vim /etc/selinux/config

    2. SELINUX=permissive

  7. Once the SELINUX flag is set (as in the step above), restart the server or run the following command.

    setenforce Permissive

  8. Disable the Linux firewall (if you had enabled).

    1. systemctl stop firewalld

    2. systemctl disable firewalld


What to do next

Install Oracle 19c

Install Oracle 19c

To install Oracle 19c:

Before you begin

Pre-Installation Steps

Procedure


Step 1

Login as a root user.

  1. xhost +local:oracle

  2. cd /home/oracle/app/oracle/product/19.0.0/dbhome_1

Step 2

Unzip the Oracle software that is downloaded from the Oracle website and place it in the /usr/programs directory. For more information, see Step 3 of Oracle Prerequisites.

unzip -oq /usr/programs/LINUX.X64_193000_db_home.zip

Step 3

Run the chown -R and the chmod -R 775 commands on the unzipped directory again.

  1. chown -R oracle:dba /home/oracle/app/oracle/product/19.0.0/dbhome_1

  2. chmod -R 775 /home/oracle/app/oracle/product/19.0.0/dbhome_1

Step 4

Create a "scripts" directory and make a shell file, "setEnv.sh", with the following content:

  1. mkdir /home/oracle/scripts

  2. Copy and paste the following content on the terminal:

    cat > /home/oracle/scripts/setEnv.sh <<EOF
    
    # Oracle Settings
    
    export ORACLE_BASE=/home/oracle/app/oracle
    
    export ORACLE_HOME=\$ORACLE_BASE/product/19.0.0/dbhome_1
    
    export PATH=\$PATH:\$ORACLE_HOME/bin
    
    export ORACLE_SID=cgms
    
    EOF
    

Step 5

Add a reference to the "setEnv.sh" file at the end of the "/home/oracle/.bash_profile" file.

echo ". /home/oracle/scripts/setEnv.sh" >> /home/oracle/.bash_profile

Step 6

Give the permission.

  1. chown -R oracle:oinstall /home/oracle/scripts

  2. chmod u+x /home/oracle/scripts/*.sh

Step 7

Create an OraInventory.

  1. mkdir -p /home/oracle/app/oraInventory

  2. chown -R oracle:dba /home/oracle/app/oraInventory

  3. chmod -R 775 /home/oracle/app/oraInventory

Step 8

Must run the following steps on the ESXi VM terminal desktop instance.

  1. Login as an Oracle user to set the 'CV_ASSUME_DISTID' to 'OEL8.1' (For more information, see Unexpected Errors During Oracle 19c Installation).

    1. su - oracle

    2. export DISPLAY=:0.0

    3. export CV_ASSUME_DISTID=OEL8.1

  2. [Optional] Source the updated .bash_profile on Oracle user.

    • source /home/oracle/.bash_profile

  3. Run the runInstaller.

    • cd /home/oracle/app/oracle/product/19.0.0/dbhome_1/

    • ./runInstaller

      Follow the runInstaller GUI instructions for Oracle 19c installation


What to do next

Run Installer.

Run Installer

To run the installer:

Before you begin

Install Oracle 19c

Procedure


Step 1

Select Set Up Software Only and click Next.

Step 2

Select Single instance database installation and click Next

Step 3

Select Enterprise Edition and click Next.

Step 4

Browse and select the Oracle base path (/home/oracle/app/oracle) and click Next.

Step 5

Browse and select the Inventory Directory (/home/oracle/app/oraInventory) and then select dba from the Group Name drop-down list and click Next.

Step 6

Select dba for all groups and click Next.

Step 7

Check the Automatically run configuration scripts check box and then provide the root user password and click Next.

Step 8

Check the Ignore All check box to force install and click Next.

Click Yes in the confirmation pop-up.

Step 9

On completion of the required settings, click Install.

Step 10

The Install Product section starts to install Oracle 19c.

Note

 

The pop-up error can be fixed by installing the required modules/packages to proceed further.

Step 11

On successful completion of the installation, the following message appears.

In case if you missed selecting the Automatically run configuration scripts option and root password, the following screen appears. You should execute the following scripts manually on another terminal.

  1. Login as a root user.
    su - root
  2. Go to the cd /home/oracle/app/oraInventory/ directory and run the following script.

    ./orainstRoot.sh
  3. Go to the cd /home/oracle/app/oracle/product/19.0.0/dbhome_1/ directory and run the following script.

    ./root.sh

After executing the above scripts as a root user, click OK in the Execute Configuration Scripts pop-up window to complete the installation. Click Finish on successful completion.


What to do next

Create, Configure, and Start CG-NMS DB

Configuring Oracle DB with FND

This section talks about configuring Oracle DB with FND.

Create, Configure, and Start CG-NMS DB

Before you begin

Run Installer

Procedure


Step 1

Download the cgms-oracle rpm from the Cisco Software Download page and save the rpm in a directory of your choice. (Example: You can save the rpm in the /usr/programs directory).

Step 2

Install the rpm.

rpm -ivh cgms-oracle-<release number>-<build number>86_64.rpm

Step 3

Run the /opt/cgms-oracle/scripts/installCgmsOracleScripts.sh script after updating the following scripts with 19.0.0 version.

  1. Go to cd /opt/cgms-oracle/scripts

  2. Update the Oracle version in the /opt/cgms-oracle/scripts/common.sh script with 19.0.0 (from 11.2.0 to 19.0.0)

    • ORACLE_VERSION=19.0.0

    • DEFAULT_ORACLE_HOME=/home/oracle/app/oracle/product/19.0.0/dbhome_1

    • Also, update the /opt/cgms-oracle/scripts/installCgmsOracleScripts.sh script with version 19.0.0

      [root@fnd-rhel8-33 scripts]# ./installCgmsOracleScripts.sh
      02-11-2022 10:06:17 EST: INFO: ======== IoT-FND Oracle Scripts Installation Started ==========
      02-11-2022 10:06:17 EST: INFO: Log file: /tmp/cgms_oracle_scripts_installation.log
      Are you sure you want to install IoT-FND Oracle scripts, templates & tools in /home/oracle/app/oracle//cgms (y/n)? y
      02-11-2022 10:06:22 EST: INFO: User response: y
      Enter 'y' if this is a secondary database server in HA configuration. Else enter 'n' (y/n)? n
      02-11-2022 10:06:26 EST: INFO: User response: n
      02-11-2022 10:06:26 EST: INFO: Oracle SID: cgms
      Enter the ORACLE_HOME directory [/home/oracle/app/oracle/product/19.0.0/dbhome_1]:
      02-11-2022 10:06:34 EST: INFO: Oracle home directory: /home/oracle/app/oracle/product/19.0.0/dbhome_1
      02-11-2022 10:06:34 EST: INFO: Copying files ...
      PSK generation started...
      Base dir : /home/oracle/app/oracle//cgms
      Warning:
      The JCEKS keystore uses a proprietary format. It is recommended to migrate to PKCS12 which is an industry standard format using "keytool -importkeystore -srckeystore /home/oracle/app/oracle//cgms/scripts/fnd_psk.keystore -destkeystore /home/oracle/app/oracle//cgms/scripts/fnd_psk.keystore -deststoretype pkcs12".
      New PSK generation completed
      02-11-2022 10:06:35 EST: INFO: Setting permissions ...
      02-11-2022 10:06:35 EST: INFO: Updating /home/oracle/.bashrc file ...
      02-11-2022 10:06:35 EST: INFO: ========== IoT-FND Oracle Scripts Installation Completed Successfully ==========
      [root@fnd-rhel8-33 scripts]#

    Note

     

    The /opt/cgms-oracle/scripts/installCgmsOracleScripts.sh script automatically updates the following:

    • Copies scripts, templates, and tools from /opt/cgms-oracle to /home/oracle/app/oracle/cgms folder.

    • Sets all the required env variable in the /home/oracle/.bashrc file.

Step 4

Run the setupCgmsDb.sh script as an Oracle user:

  1. su - oracle

  2. # export ORACLE_BASE=/home/oracle/app/oracle

  3. cd $ORACLE_BASE/cgms/scripts

  4. ./setupCgmsDb.sh

    • Enter cgmsDba123 for SYS DBA password and cgms123 for CG-NMS Database password.

      Note

       

      On successful completion, the setCgmsDb.sh script starts Oracle automatically.

      [oracle@fnd-rhel8-33 scripts]$ ./setupCgmsDb.sh
      02-11-2022 10:15:46 EST: INFO: ======== CGMS Database Setup Started ==========
      02-11-2022 10:15:46 EST: INFO: Log file: /tmp/cgmsdb_setup.log
      Are you sure you want to setup IoT-FND database (y/n)? y
      02-11-2022 10:15:55 EST: INFO: User response: y
      02-11-2022 10:15:55 EST: INFO: CGMS database does not exist.
      Enter new password for SYS DBA:            <cgmsDba123>
      Re-enter new password for SYS DBA:    <cgmsDba123>
      02-11-2022 10:16:10 EST: INFO: User entered SYS DBA password.
      Enter new password for IoT-FND database:     <cgms123>
      Re-enter new password IoT-FND database:     <cgms123>
      02-11-2022 10:16:17 EST: INFO: User entered IoT-FND DB password.
      02-11-2022 10:16:17 EST: INFO: Stopping listener ...
      02-11-2022 10:16:58 EST: INFO: Listener already stopped.
      02-11-2022 10:16:58 EST: INFO: Deleting database files ...
      02-11-2022 10:16:58 EST: INFO: Creating listener ...
      02-11-2022 10:16:58 EST: INFO: Listener creation completed successfully.
      02-11-2022 10:16:58 EST: INFO: Configuring listener ...
      02-11-2022 10:16:58 EST: INFO: Listener successfully configured.
      02-11-2022 10:16:58 EST: INFO: Oracle version : 19c
      02-11-2022 10:16:58 EST: INFO: Creating database. This may take a while. Please be patient ...
      02-11-2022 10:23:43 EST: INFO: Database creation completed successfully.
      02-11-2022 10:23:43 EST: INFO: Updating /etc/oratab ...
      02-11-2022 10:23:43 EST: INFO: /etc/oratab updated.
      02-11-2022 10:23:43 EST: INFO: Configuring database ...
      02-11-2022 10:23:44 EST: INFO: Starting listener ...
      02-11-2022 10:23:54 EST: INFO: Listener start completed successfully.
      02-11-2022 10:23:54 EST: INFO: Starting database configuration ...
      02-11-2022 10:24:51 EST: INFO: Database configuration completed successfully.
      02-11-2022 10:24:51 EST: INFO: Starting Oracle ...
      02-11-2022 10:24:51 EST: INFO: Starting Oracle in mount state ...
      ORACLE instance started.
      Total System Global Area 4982831096 bytes
      Fixed Size                  8906744 bytes
      Variable Size             905969664 bytes
      Database Buffers         4060086272 bytes
      Redo Buffers                7868416 bytes
      Database mounted.
      02-11-2022 10:25:03 EST: INFO: Opening database for read/write ...
      Database altered.
      02-11-2022 10:25:04 EST: INFO: ========== CGMS Database Setup Completed Successfully ==========
      [oracle@fnd-rhel8-33 scripts]$
      

Step 5

To start Oracle automatically on a system reboot, execute the $ORACLE_BASE/cgms/scripts/installOracleJob.sh script as an Oracle user.

  1. su - oracle

  2. cd $ORACLE_BASE/cgms/scripts

  3. ./installOracleJob.sh

    [oracle@fnd-rhel8-33 scripts]$ ./installOracleJob.sh
    02-15-2022 17:26:24 IST: INFO: ========== Started ==========
    02-15-2022 17:26:24 IST: INFO: Log file: /tmp/cgms_oracle_cronjob.log
    02-15-2022 17:26:24 IST: INFO: Creating Oracle cronjob ...
    no crontab for oracle
    ORACLE_HOME=/home/oracle/app/oracle/product/19.0.0/dbhome_1
    ORACLE_BASE=/home/oracle/app/oracle
    DISPLAY=localhost:0
    ORACLE_SID=cgms
    @reboot /home/oracle/app/oracle/cgms/scripts/startOracle.sh
    02-15-2022 17:26:24 IST: INFO: Successfully created Oracle cronjob.
    02-15-2022 17:26:24 IST: INFO: ==========  Completed Successfully ==========

What to do next

Install CGMS RPM

Install CGMS RPM

To install CGMS rpm:

Before you begin

Create, Configure, and Start CG-NMS DB

Procedure


Step 1

Install the cgms rpm.

  1. rpm -ivh cgms-<release number>-<build number>86_64.rpm

Step 2

[This step is Optional] Copy the cgms_keystore and cgms.properties from any working FND server into the /opt/cgms/server/cgms/conf/ directory.

Step 3

Run db-migrate.

  1. cd /opt/cgms/bin/

  2. ./db-migrate

    [root@fnd-rhel8-33 bin]#./db-migrate
    Enter database password: <cgms123>
    02-11-2022 10:48:11 EST: INFO: Log file: /opt/cgms/bin/../server/cgms/log/cgms_setup.log
    02-11-2022 10:48:11 EST: INFO: Performing pre migration. This may take a while. Please wait ...
    02-11-2022 10:48:12 EST: INFO: Pre migration completed.
    02-11-2022 10:48:12 EST: INFO: Performing migration. This may take a while. Please wait ...
    02-11-2022 10:48:58 EST: INFO: Migration completed.
    02-11-2022 10:48:58 EST: INFO: Performing post migration. This may take a while. Please wait ...
    02-11-2022 10:51:57 EST: INFO: Post migration completed.
    [root@fnd-rhel8-33 bin]#

Step 4

Start the cgms service.

service cgms start

Step 5

Check the cgms service status.

[root@fnd-rhel8-33 ~]# service cgms status

IoT-FND Version 4.8.1-8
02-14-2022 14:43:30 IST: INFO: IoT-FND database server: localhost
02-14-2022 14:43:31 IST: INFO: IoT-FND database connection verified.
02-14-2022 14:43:32 IST: INFO: IoT-FND application server is up and running.
02-14-2022 14:43:32 IST: INFO: IoT-FND is up and running.
[root@fnd-rhel8-33 ~]#


What to do next

For the patch installation steps, if necessary, see Patch Installation.