Sunday, 3 January 2021

Oracle Database 18c installation on Linux 7

Memory and Disk Space Requirements


  • Minimum: 1 GB of RAM , Recommended: 2 GB of RAM or more
  • 7.5 GB of disk space for the software installation
  • 1.7 GB of disk space for the Database files
  • At least 1 GB of disk space in the /tmp directory
  • Swap space recommendation:

     Available RAM                                   Swap Space Required
1. Between 1 GB and 2 GB                              1.5 times the size of the RAM
2. Between 2 GB and 16 GB                             Equal to the size of the RAM
3. More than 16 GB                                          16 GB

The following packages (or later versions) must be installed

yum install -y bc
yum install -y binutils
yum install -y compat-libcap1
yum install -y compat-libstdc++-33
yum install -y compat-libstdc++-33.i686
yum install -y elfutils-libelf.i686
yum install -y elfutils-libelf
yum install -y elfutils-libelf-devel.i686
yum install -y elfutils-libelf-devel
yum install -y fontconfig-devel
yum install -y glibc.i686
yum install -y glibc
yum install -y glibc-devel.i686
yum install -y glibc-devel
yum install -y ksh
yum install -y libaio.i686
yum install -y libaio
yum install -y libaio-devel.i686
yum install -y libaio-devel
yum install -y libX11.i686
yum install -y libX11
yum install -y libXau.i686
yum install -y libXau
yum install -y libXi.i686
yum install -y libXi
yum install -y libXtst.i686
yum install -y libXtst
yum install -y libgcc.i686
yum install -y libgcc
yum install -y librdmacm-devel
yum install -y libstdc++.i686
yum install -y libstdc++
yum install -y libstdc++-devel.i686
yum install -y libstdc++-devel
yum install -y libxcb.i686
yum install -y libxcb
yum install -y make
yum install -y nfs-utils
yum install -y net-tools
yum install -y python
yum install -y python-configshell
yum install -y python-rtslib
yum install -y python-six
yum install -y smartmontools
yum install -y sysstat
yum install -y targetcli
yum install -y unixODBC


Create Required Operating System Groups and Users

groupadd oinstall groupadd dba useradd -g oinstall -G dba oracle


If the oracle user exists, but its primary group is not oinstall or it is not a member of the dba group, then enter the following command: 

 usermod -g oinstall -G dba oracle


Configuring Kernel Parameters and Resource Limits

For production database systems, Oracle recommends that you tune these values to optimize the performance of the system.

edit the /etc/sysctl.conf file, and add or edit lines similar to the following:

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



Enter the following command to change the current values of the kernel parameters:

/sbin/sysctl -p


Add the following lines to the "/etc/security/limits.conf" file.


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


Create the directories in which the Oracle software will be installed.

mkdir -p /u01/app/oracle/product/18.0.0/db_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01
chgrp oinstall /u01/app/oracle/product/18.0.0/db_1



Automatic Setup
If you plan to use the "oracle-database-preinstall-18c" package to perform all your prerequisite setup, issue the following command.

yum install -y oracle-database-preinstall-18c


Download Software


If you have had an existing installation on your system, and you are using the same user account to install this installation, then unset the ORACLE_HOME, ORACLE_BASE, ORACLE_SID, TNS_ADMIN environment variables 

unset ORACLE_HOME
unset ORACLE_BASE
unset ORACLE_SID
unset TNS_ADMIN


Use the following command to check the PATH environment variable:

[oracle@joshi ~]$  echo $PATH
/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/oracle/.local/bin:/home/oracle/bin

Ensure that the $ORACLE_HOME/bin path is removed from your PATH environment variable.


Installation

Unzip software.

cd /u01/app/oracle/product/18.0.0/db_1
unzip -oq /soft/oracle/LINUX.X64_180000_db_home.zip


From the Oracle home directory, run the runInstaller command to start the Oracle Database Setup Wizard.

cd /u01/app/oracle/product/18.0.0/db_1

[oracle@joshi db_1]$ pwd
/u01/app/oracle/product/18.0.0/db_1
[oracle@joshi db_1]$

[oracle@joshi db_1]$ ./runInstaller
Launching Oracle Database Setup Wizard...

The response file for this session can be found at:
 /u01/app/oracle/product/18.0.0/db_1/install/response/db_2021-01-03_02-58-41PM.rsp

You can find the log of this install session at:
 /u01/app/oraInventory/logs/InstallActions2021-01-03_02-58-41PM/installActions2021-01-03_02-58-41PM.log
[oracle@joshi db_1]$













[root@joshi ~]# /u01/app/oracle/product/18.0.0/db_1/root.sh
Performing root user operation.


The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/18.0.0/db_1


Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying coraenv to /usr/local/bin ...


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.
Do you want to setup Oracle Trace File Analyzer (TFA) now ? yes|[no] :
yes
Installing Oracle Trace File Analyzer (TFA).
Log File: /u01/app/oracle/product/18.0.0/db_1/install/root_joshi_2021-01-03_15-08-48-155230389.log
Finished installing Oracle Trace File Analyzer (TFA)
[root@joshi ~]#



Reference;



SILENT MODE

./runInstaller -ignorePrereq -waitforcompletion -silent \
-responseFile /u01/app/oracle/product/18.0.0/db_1/install/response/db_install.rsp \
oracle.install.option=INSTALL_DB_SWONLY \
ORACLE_HOSTNAME=joshi \
UNIX_GROUP_NAME=oinstall \
INVENTORY_LOCATION=/u01/app/oraInventory \
ORACLE_HOME=/u01/app/oracle/product/18.0.0/db_1 \
ORACLE_BASE=/u01/app/oracle \
oracle.install.db.InstallEdition=EE \
oracle.install.db.OSDBA_GROUP=dba \
oracle.install.db.OSBACKUPDBA_GROUP=dba \
oracle.install.db.OSDGDBA_GROUP=dba \
oracle.install.db.OSKMDBA_GROUP=dba \
oracle.install.db.OSRACDBA_GROUP=dba \
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false \
DECLINE_SECURITY_UPDATES=true


Run the root scripts when prompted.

As a root user, execute the following script(s):
1. /u01/app/oraInventory/orainstRoot.sh
2. /u01/app/oracle/product/18.0.0/db_1/root.sh

No comments:

Post a Comment