Oracle Database 19c installation on Linux 8

 

In this post I will describe the installation of Oracle Database 19c 64-bit on Oracle Linux 8 (OL8) 64-bit. The installation require a minimum of 2g swap memory and secure Linux set to permissive.

·       Download Software

Oracle Database 19c (19.3) Software (64-bit)


Add hosts entry in hosts file

[oracle@ocisoumya-2 PDB1]$ cat /etc/hosts

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4

::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

10.0.0.142 ocisoumya-2.subnet09232321.vcn09232321.oraclevcn.com ocisoumya-2



    ·       Oracle Installation

The installation can be done either in Automatic or Manual way

1.     Automatic installation

 

[root@ocisoumya oled]# dnf install -y oracle-database-preinstall-19c

 

2.       Manual Installation

a.       In this installation mode, we need to make following changes on /etc/sysctl.conf file

[root@ocisoumya oled]# vi /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



b.       Run following command to amend the changes.

 

[root@ocisoumya oled]# sysctl -p


c.     Make changes in /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



d.       Install following packages

dnf install -y bc   

dnf install -y binutils

#dnf install -y compat-libcap1

dnf install -y compat-libstdc++-33

#dnf install -y dtrace-modules

#dnf install -y dtrace-modules-headers

#dnf install -y dtrace-modules-provider-headers

#dnf install -y dtrace-utils

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 libdtrace-ctf-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

# New for OL8

dnf install -y libnsl

dnf install -y libnsl.i686

dnf install -y libnsl2


dnf install -y libnsl2.i686




e.  Create group and oracle user

groupadd -g 54321 oinstall

groupadd -g 54322 dba


useradd -u 54321 -g oinstall -G dba oracle




         Set password for oracle user

[root@ocisoumya ~]# passwd oracle

Changing password for user oracle.

New password:

Retype new password:

passwd: all authentication tokens updated successfully.

 

ff

         Set Disabled or PERMISSIVE to SELINUX

[root@ocisoumya ~]# vi /etc/selinux/config

SELINUX=disabled



·                          Disable firewall

[root@ocisoumya ~]# systemctl stop firewalld

[root@ocisoumya ~]# systemctl disable firewalld

Removed /etc/systemd/system/multi-user.target.wants/firewalld.service.

Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.



·       Create directories for oracle installation.

[oracle@ocisoumya u01]$ mkdir -p /u01/app/oracle/19.3.0/dbhome_1

[oracle@ocisoumya u01]$ chown -R oracle:oinstall /u01

[oracle@ocisoumya u01]$ chmod -R 775 /u01


·       Login to root user and perform

[root@ocisoumya opc]# xhost +

 

[root@ocisoumya opc]# su – oracle



·       Prepare bash_profile to set oracle home and other paths

export ORACLE_BASE=/u01/app

export ORACLE_HOME=/u01/app/oracle/19.3.0/dbhome_1

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib

export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

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

export PATH=$JAVA_HOME/bin:$ORACLE_HOME/bin:$PATH

export ORACLE_SID=ORCL


·       Unzip the software

[oracle@ocisoumya ~]$ cd $ORACLE_HOME

[oracle@ocisoumya dbhome_1]$ unzip -oq /u01/LINUX.X64_193000_db_home.zip




Start installation by invoking runinstaller using command We would only install the binary in first phase.

[oracle@ocisoumya dbhome_1]$ export ORACLE_HOSTNAME=ocisoumya.example.com

[oracle@ocisoumya dbhome_1]$ export ORA_INVENTORY= /u01/oraInventory

 

[oracle@ocisoumya dbhome_1]$ ./runInstaller -ignorePrereq -waitforcompletion -silent                        \

     -responseFile ${ORACLE_HOME}/install/response/db_install.rsp               \

     oracle.install.option=INSTALL_DB_SWONLY                                    \

     ORACLE_HOSTNAME=${ORACLE_HOSTNAME}                                         \

     UNIX_GROUP_NAME=oinstall                                                   \

     INVENTORY_LOCATION=${ORA_INVENTORY}                                        \

     SELECTED_LANGUAGES=en,en_GB                                                \

     ORACLE_HOME=${ORACLE_HOME}                                                 \

     ORACLE_BASE=${ORACLE_BASE}                                                 \

     oracle.install.db.InstallEdition=EE                                        \

     oracle.install.db.OSDBA_GROUP=oinstall                                          \

     oracle.install.db.OSBACKUPDBA_GROUP=oinstall                                    \

     oracle.install.db.OSDGDBA_GROUP=oinstall                                        \

     oracle.install.db.OSKMDBA_GROUP=oinstall                                        \

     oracle.install.db.OSRACDBA_GROUP=oinstall                                       \

     SECURITY_UPDATES_VIA_MYORACLESUPPORT=false                                 \

                   DECLINE_SECURITY_UPDATES=true


Execute following scripts as root user post software installation

As a root user, execute the following script(s):

        1. /u01/app/oraInventory/orainstRoot.sh

        2. /u01/app/oracle/19.3.0/dbhome_1/root.sh

 

·       Database Creation

The Database Configuration Assistant (DBCA) is typically used to create databases. To facilitate user interaction, GUI screens will be displayed in the interactive mode. In this post, however, I'll create the database in silent mode without showing any windows because the command line already has all the necessary options given.


dbca -silent -createDatabase                                                   \

 -templateName General_Purpose.dbc                                         \

 -gdbname ${ORACLE_SID} -sid  ${ORACLE_SID} -responseFile NO_VALUE         \

 -characterSet AL32UTF8                                                    \

 -sysPassword welcome123#                                                \

 -systemPassword welcome123#                                              \

 -createAsContainerDatabase true                                           \

 -numberOfPDBs 1                                                           \

 -pdbName PDB1                                                     \

 -pdbAdminPassword welcome123#                                           \

 -databaseType MULTIPURPOSE                                                \

 -memoryMgmtType auto_sga                                                  \

 -totalMemory 2000                                                         \

 -storageType FS                                                           \

 -datafileDestination "/u01/app/oradata/ORCL"                                        \

 -redoLogFileSize 512                                                       \

 -emConfiguration NONE                                                     \

  -ignorePreReqs

S


This concludes the oracle database 19c installation on Linux 8












No comments:

Post a Comment