Showing posts with label Installation. Show all posts
Showing posts with label Installation. Show all posts

Thursday, 29 December 2022

Create New File System on Linux Machine

 

Add new disk to Server

[root@ggtarget u01]# ls -ltrha /dev/sd*
brw-rw----. 1 root disk 8, 0 Aug 13 02:08 /dev/sda
brw-rw----. 1 root disk 8, 2 Aug 13 02:08 /dev/sda2
brw-rw----. 1 root disk 8, 1 Aug 13 02:08 /dev/sda1
brw-rw----. 1 root disk 8, 16 Aug 13 02:08 /dev/sdb
brw-rw----. 1 root disk 8, 32 Aug 13 02:08 /dev/sdc


[root@ggtarget u01]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTsdb 8:16 0 30G 0 disk
sr0 11:0 1 1024M 0 rom
sdc 8:32 0 30G 0 disk ======>>> NEWLY ADDED DISK
sda 8:0 0 50G 0 disk
├─sda2 8:2 0 49G 0 part
│ ├─ol-swap 252:1 0 4G 0 lvm [SWAP]
│ ├─ol-tmp 252:2 0 7G 0 lvm /tmp
│ ├─ol-root 252:0 0 10G 0 lvm /
│ └─ol-u01 252:3 0 28G 0 lvm /u01
└─sda1 8:1 0 1G 0 part /boot


Create a partition of a newly added disk

[root@ggtarget u01]# fdisk /dev/sdc

Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0x0c577db8.
Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p):p
Using default response p
Partition number (1-4, default 1):1
First sector (2048-62914559, default 2048): 2048
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-62914559, default 62914559):62914559
Using default value 62914559
Partition 1 of type Linux and of size 30 GiB is set
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.

[root@ggtarget u01]# lsblk

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdb 8:16 0 30G 0 disk
sr0 11:0 1 1024M 0 rom
sdc 8:32 0 30G 0 disk
└─sdc1 8:33 0 30G 0 part ==> THIS
sda 8:0 0 50G 0 disk
├─sda2 8:2 0 49G 0 part
│ ├─ol-swap 252:1 0 4G 0 lvm [SWAP]
│ ├─ol-tmp 252:2 0 7G 0 lvm /tmp
│ ├─ol-root 252:0 0 10G 0 lvm /
│ └─ol-u01 252:3 0 28G 0 lvm /u01
└─sda1 8:1 0 1G 0 part /boot

Create and Mount the File-System

[root@ggtarget u01]# mkfs.xfs /dev/sdc1

meta-data=/dev/sdc1 isize=256 agcount=4, agsize=1966016 blks
= sectsz=512 attr=2, projid32bit=1
= crc=0 finobt=0, sparse=0
data = bsize=4096 blocks=7864064, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal log bsize=4096 blocks=3839, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0


[root@ggtarget u01]# blkid /dev/sdc1

/dev/sdc1: UUID="a8e2c27e-9618-43a3-999f-097819144ec3" TYPE="xfs"

[root@ggtarget u01]# mkdir /u02

[root@ggtarget u01]# mount -t xfs /dev/sdc1 /u02

[root@ggtarget u01]# df -h /u02
Filesystem Size Used Avail Use% Mounted on
/dev/sdc1 30G 33M 30G 1% /u02


Add an entry to fstab

[root@ggtarget u01]# cat /etc/fstab | grep u02

UUID="a8e2c27e-9618-43a3-999f-097819144ec3" /u02 xfs defaults        0 0

[root@ggtarget u01]#


[root@ggtarget u01]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdb 8:16 0 30G 0 disk
sr0 11:0 1 1024M 0 rom
sdc 8:32 0 30G 0 disk
└─sdc1 8:33 0 30G 0 part /u02 ==>THIS
sda 8:0 0 50G 0 disk
├─sda2 8:2 0 49G 0 part
│ ├─ol-swap 252:1 0 4G 0 lvm [SWAP]
│ ├─ol-tmp 252:2 0 7G 0 lvm /tmp
│ ├─ol-root 252:0 0 10G 0 lvm /
│ └─ol-u01 252:3 0 28G 0 lvm /u01
└─sda1 8:1 0 1G 0 part /boot


Install 21c Grid Infrastructure with Oracle ASM Filter Driver


Create a partition of the disk

 [root@ggtarget u01]# fdisk /dev/sdb

Welcome to fdisk (util-linux 2.23.2).

 Changes will remain in memory only, until you decide to write them.

Be careful before using the write command.

 Device does not contain a recognized partition table

Building a new DOS disklabel with disk identifier 0xb049a9bf.

 Command (m for help): n

Partition type:

   p   primary (0 primary, 0 extended, 4 free)

   e   extended

Select (default p): p

Using default response p

Partition number (1-4, default 1): 1

First sector (2048-62914559, default 2048):2048

Using default value 2048

Last sector, +sectors or +size{K,M,G} (2048-62914559, default 62914559):

Using default value 62914559

Partition 1 of type Linux and of size 30 GiB is set

 

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

Syncing disks.

[root@ggtarget u01]# lsblk

NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT

sdb           8:16   0   30G  0 disk

└─sdb1        8:17   0   30G  0 part

sr0          11:0    1 1024M  0 rom

sdc           8:32   0   30G  0 disk

└─sdc1        8:33   0   30G  0 part /u02

sda           8:0    0   50G  0 disk

├─sda2        8:2    0   49G  0 part

│ ├─ol-swap 252:1    0    4G  0 lvm  [SWAP]

│ ├─ol-tmp  252:2    0    7G  0 lvm  /tmp

│ ├─ol-root 252:0    0   10G  0 lvm  /

│ └─ol-u01  252:3    0   28G  0 lvm  /u01

└─sda1        8:1    0    1G  0 part /boot


Create a Directory for GI home

[root@ggtarget u01]#

mkdir -p /u02/app/21c/grid

chown oracle:oinstall /u02/app/21c/grid


Unzip the 21c GI software

su - oracle

cd /u02/app/21c/grid

unzip -q /tmp/grid_home.zip


Create ASMFD disk label

su - root

[root@ggtarget u01]# export ORACLE_HOME=/u02/app/21c/grid

[root@ggtarget u01]# export ORACLE_BASE=/tmp

[root@ggtarget u01]# cd /u02/app/21c/grid/bin

[root@ggtarget bin]# ./asmcmd afd_label DATA1 /dev/sdb1 --init

Creating diag directory /tmp/diag

[root@ggtarget bin]# ./asmcmd afd_lslbl /dev/sdb1

----------------------------------------------------------------

Label                     Duplicate  Path

======================================

DATA1                                 /dev/sdb1


Update the SELinux

[root@ggtarget u02]# getenforce

Enforcing

[root@ggtarget u02]# setenforce 0

[root@ggtarget u02]# getenforce

Permissive

[root@ggtarget u02]#
These methods above will only work until the next reboot, therefore to disable SELinux permanently, move to the next section.

To permanently disable SELinux,  to open the file /etc/sysconfig/selinux as follows:

vi /etc/sysconfig/selinux

SELINUX=disabled

Sestatus


Start the 21c Grid Infrastructure installation.

unset ORACLE_BASE

Log in as the Oracle Restart software owner user and run gridSetup.sh to start the Oracle Grid Infrastructure installation wizard


 







 








 



 






 






[root@ggtarget u02]# /u02/app/21c/grid/root.sh

Performing root user operation.

The following environment variables are set as:

    ORACLE_OWNER= oracle

    ORACLE_HOME=  /u02/app/21c/grid

 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.

Using configuration parameter file: /u02/app/21c/grid/crs/install/crsconfig_params

2022-08-13 03:08:06: Got permissions of file /u02/app/crsdata/ggtarget/crsconfig: 0775

2022-08-13 03:08:06: Got permissions of file /u02/app/crsdata: 0775

2022-08-13 03:08:06: Got permissions of file /u02/app/crsdata/ggtarget: 0775

The log of current session can be found at:

  /u02/app/crsdata/ggtarget/crsconfig/roothas_2022-08-13_03-08-06AM.log

Redirecting to /bin/systemctl restart rsyslog.service

LOCAL ADD MODE

Creating OCR keys for user 'oracle', privgrp 'oinstall'..

Operation successful.

LOCAL ONLY MODE

Successfully accumulated necessary OCR keys.

Creating OCR keys for user 'root', privgrp 'root'..

Operation successful.

CRS-4664: Node ggtarget successfully pinned.

2022/08/13 03:10:11 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'

ggtarget     2022/08/13 03:11:46     /u02/app/crsdata/ggtarget/olr/backup_20220813_031146.olr     0

2022/08/13 03:11:49 CLSRSC-327: Successfully configured Oracle Restart for a standalone server

[root@ggtarget u02]#

 



 


Verification

 [oracle@ggtarget ~]$ ps -ef|grep pmon

oracle 22413 1 0 03:13 ? 00:00:00 asm_pmon_+ASM
oracle 23455 10089 0 03:15 pts/3 00:00:00 grep --color=auto pmon
   

[oracle@ggtarget ~]$ ps -ef|grep tns

root 23 2 0 02:08 ? 00:00:00 [netns]
oracle 21098 1 0 03:12 ? 00:00:00 /u02/app/21c/grid/bin/tnslsnr LISTENER -no_crs_notify -inherit
oracle 23575 10089 0 03:16 pts/3 00:00:00 grep --color=auto tns

[oracle@ggtarget ~]$

[oracle@ggtarget ~]$ /u02/app/21c/grid/bin/crsctl stat res -t

--------------------------------------------------------------------------------
Name Target State Server State details 
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------

ora.DATA.dg               ONLINE  ONLINE       ggtarget                 STABLE

ora.LISTENER.lsnr                ONLINE  ONLINE       ggtarget                 STABLE

ora.asm               ONLINE  ONLINE       ggtarget                 Started,STABLE

ora.ons               OFFLINE OFFLINE      ggtarget                 STABLE

--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------

ora.cssd      1        ONLINE  ONLINE       ggtarget                 STABLE

ora.diskmon       1        OFFLINE OFFLINE                               STABLE

ora.driver.afd       1        ONLINE  ONLINE       ggtarget                 STABLE

ora.evmd      1        ONLINE  ONLINE       ggtarget                 STABLE

--------------------------------------------------------------------------------

[oracle@ggtarget ~]$

[oracle@ggtarget ~]$ . oraenv

ORACLE_SID = [oracle] ? +ASM

 [oracle@ggtarget ~]$ asmcmd lsdg

State    Type    Rebal  Sector  Logical_Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name

MOUNTED  EXTERN  N         512             512   4096  4194304     30716    30612                0           30612              0             N  DATA/

 

[oracle@ggtarget ~]$ $ORACLE_HOME/bin/asmcmd lsdsk

Path

AFD:DATA1

 [oracle@ggtarget ~]$ $ORACLE_HOME/bin/asmcmd afd_state

ASMCMD-9526: The AFD state is 'LOADED' and filtering is 'ENABLED' on host 'ggtarget.localdomain'

[oracle@ggtarget ~]$

[oracle@ggtarget ~]$ $ORACLE_HOME/bin/asmcmd dsget

parameter:/dev/sd*, AFD:*

profile:/dev/sd*,AFD:*

[oracle@ggtarget ~]$

 

Reference 

https://docs.oracle.com/en/database/oracle/oracle-database/21/cwlin/configuring-oracle-asmfd-after-installation.html#GUID-19A3AF92-FC15-4518-9509-C35976344A4C

 

Wednesday, 6 January 2021

Oracle Database 19c installation on Linux 7

 Memory and Disk Space Requirements


  • Minimum: 1 GB of RAM , Recommended: 2 GB of RAM or more
  • 7.2 GB of disk space for the software installation
  • 7.5 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


Verify the latest version of PAM is loaded, then add or edit the following line in the /etc/pam.d/login file, if it does not already exist:

session required pam_limits.so


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

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



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

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


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/19.3.0/db_1
unzip -oq /soft/oracle/LINUX.X64_193000_db_home.zip

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

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

[oracle@joshi db_1]$ ./runInstaller













[root@joshi db_1]# /u01/app/oracle/product/19.3.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/19.3.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 contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.

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.
Oracle Trace File Analyzer (TFA - Standalone Mode) is available at :
    /u01/app/oracle/product/19.3.0/db_1/bin/tfactl

Note :
1. tfactl will use TFA Service if that service is running and user has been granted access
2. tfactl will configure TFA Standalone Mode only if user has no access to TFA Service or TFA is not installed

[root@joshi db_1]#






Reference;



If you are on Oracle Linux 8 and Red Hat Enterprise Linux 8, you can apply the latest RU & required One-offs during the installation.


Download latest OPatch,prior to launching the Installer.


In case of 19.9 RU & later
===========================================
$ export CV_ASSUME_DISTID=OL7
$ ./runInstaller -applyRU <19.7DBRU patch 31771877 unzip location>


For eg-
$ ./runInstaller -applyRU /u01/app/31771877


where-
31771877 - DATABASE RELEASE UPDATE 19.9.0.0.0


In case of 19.6 RU
===========================================
$ cd /u01/app/oracle/product/19c/dbhome_1

$ export CV_ASSUME_DISTID=OL7
$ ./runInstaller -applyRU <19.6 DBRU patch 30557433 unzip location> -applyOneOffs <19.6 OJVM patch 30484981 unzip location>,<19.6 Oneoff patch 30150710 unzip location>


For eg-
$ ./runInstaller -applyRU /u01/app/30557433 -applyOneOffs /u01/app/30484981,/u01/app/30150710


where-
30557433 - DATABASE RELEASE UPDATE 19.6.0.0.0
30484981 - OJVM RELEASE UPDATE 19.6.0.0.0
30150710 - EM express OneOff patch 19.6.0.0.0



Reference;
Requirements for Installing Oracle Database/Client 19c on OL8 or RHEL8 64-bit (x86-64) (Doc ID 2668780.1)



SILENT MODE

./runInstaller -ignorePrereq -waitforcompletion -silent \
-responseFile /u01/app/oracle/product/19.3.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/19.3.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/19.3.0/db_1/root.sh



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