1)
Host Configuration
A)
Configure hosts file /etc/hosts
# Public
(eth0)
192.168.0.200 PRODDB
B)
Configure SELINUX
Set secure Linux to
permissive by editing the "/etc/selinux/config" file, making sure the
SELINUX flag is set as follows.
SELINUX=permissiveOnce the change is
complete, restart the server or run the following command.
# setenforce PermissiveC)
Stop and Disable firewall
# systemctl stop firewalld# systemctl disable firewalld2)
Oracle Package Required
A)
Update package required by Oracle Database App
installation
-----[root@hostname ~]# yum install compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm
[root@hostname ~]# yum install oracle-database-preinstall-19c
[root@hostname ~]# yum install iscsi-initiator-utils -y
[root@hostname ~]# systemctl enable --now iscsid
[root@hostname ~]# systemctl status iscsid
[root@hostname ~]# iscsiadm -m discovery -t sendtargets -p
192.168.49.9
---[root@hostname
~]# yum install perl
B)
Create group and user(oracle,grid)
# id
oracle
uid=54321(oracle) gid=54321(oinstall)
groups=54321(oinstall),54322(dba),54323(oper),54324(backupdba),54325(dgdba),54326(kmdba),54330(racdba)
# groupadd -g 54327 asmadmin
# groupadd -g 54328 asmdba
# groupadd -g 54329 asmoper
# useradd -u 54322 -g oinstall -G
asmadmin,asmdba,asmoper,dba grid
[root@hostname ~]# passwd grid
Changing password for user grid.
New password:
BAD PASSWORD: it is too
simplistic/systematic
BAD PASSWORD: is too simple
Retype new password:
passwd: all authentication tokens updated
successfully.
[root@hostname ~]# passwd oracle
Changing password for user oracle.
New password:
BAD PASSWORD: it is too
simplistic/systematic
BAD PASSWORD: is too simple
Retype new password:
passwd: all authentication tokens updated
successfully.
[root@hostname ~]#
[root@hostname ~]# mkdir -p /u01/app/grid
[root@hostname ~]# chown -R grid:oinstall
/u01
[root@hostname ~]# mkdir -p
/u01/app/oracle
[root@hostname ~]# chown -R
oracle:oinstall /u01/app/oracle
[root@hostname ~]# chmod -R 775 /u01/
C)
Configure Profile on users
a)
Oracle OS User
[oracle@hostname
~]$ vi .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup
programs
export ORACLE_SID=T24UATDB
export ORACLE_UNQNAME= T24UATDB
export JAVA_HOME=/usr/local/java
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/19C/db_home1
export ORACLE_TERM=xterm
export NLS_DATE_FORMAT="DD-MON-YYYY
HH24:MI:SS"
export
TNS_ADMIN=$ORACLE_HOME/network/admin
export ORA_NLS11=$ORACLE_HOME/nls/data
PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin
PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
PATH=${PATH}:/u01/app/common/oracle/bin
export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export CLASSPATH
export
THREADS_FLAG=native
export TEMP=/tmp
export TMPDIR=/tmp
umask 022
~
b)
Grid OS User
[grid@hostname
~]$ vi .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup
programs
export ORACLE_SID=+ASM
export JAVA_HOME=/usr/local/java
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/grid/product/19C/grid
export ORACLE_TERM=xterm
export NLS_DATE_FORMAT="DD-MON-YYYY
HH24:MI:SS"
export
TNS_ADMIN=$ORACLE_HOME/network/admin
export ORA_NLS11=$ORACLE_HOME/nls/data
PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin
PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
PATH=${PATH}:/u01/app/common/oracle/bin
export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export CLASSPATH
export THREADS_FLAG=native
export TEMP=/tmp
export TMPDIR=/tmp
umask 022
~
3)
Storage Configuration
A)
Format Disk
+MGMT =100GB
+OCR+Voting= 15GB x3
Number of copies depends on redundancy:
- External
redundancy → 1 voting file.
- Normal
redundancy → 3 voting files.
- High
redundancy → 5 voting files.
+DATA
+FRA
+Redo
a)
Configure Disk
[root@Node1 ~]# fdisk /dev/sdd
Device contains neither a valid DOS
partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk
identifier 0x2615ad0b.
Changes will remain in memory only, until
you decide to write them.
After that, of course, the previous
content won't be recoverable.
Warning: invalid flag 0x0000 of partition
table 4 will be corrected by w(rite)
WARNING: DOS-compatible mode is
deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-24352, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G}
(1-24352, default 24352):
Using default value 24352
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition
table.
Syncing disks.
|
|
|
|
|
/dev/sda |
OCR1 |
|
|
/dev/sdb |
MGMT |
|
|
/dev/sdc |
FRA |
|
|
DATA |
|
|
|
/dev/sdd |
OCR2 |
|
|
/dev/sde |
OCR3 |
|
b) Check
Disk
[root@Node1 ~]# fdisk -l | grep dev
Disk /dev/nvme0n1: 100 GiB, 107374182400
bytes, 209715200 sectors
/dev/nvme0n1p1 * 2048
1050623 1048576 512M 83 Linux
/dev/nvme0n1p2 1050624 209715199 208664576 99.5G 8e
Linux LVM
Disk /dev/mapper/ol-root: 68.5 GiB,
73547120640 bytes, 143646720 sectors
Disk /dev/mapper/ol-swap: 16 GiB,
17179869184 bytes, 33554432 sectors
Disk /dev/mapper/ol-tmp: 15 GiB,
16106127360 bytes, 31457280 sectors
Disk /dev/sdc: 476.8 GiB, 511973523456
bytes, 999948288 sectors
/dev/sdc1 2048 999948287 999946240 476.8G 8e
Linux LVM
Disk /dev/sdd: 14.3 GiB, 15334375424
bytes, 29949952 sectors
/dev/sdd1 2048 29949951 29947904 14.3G 8e Linux
LVM
Disk /dev/sde: 14.3 GiB, 15334375424
bytes, 29949952 sectors
/dev/sde1 2048 29949951 29947904 14.3G 8e Linux
LVM
Disk /dev/sdb: 95.4 GiB, 102374572032
bytes, 199950336 sectors
/dev/sdb1 2048 199950335 199948288 95.4G 8e Linux
LVM
Disk /dev/sda: 14.3 GiB, 15334375424
bytes, 29949952 sectors
/dev/sda1 2048 29949951 29947904 14.3G 8e Linux
LVM
#
c)
Give Permission to Disk
[root@Node1
~]# chown grid:asmadmin /dev/sda1
[root@Node1 ~]# chmod 660 /dev/sda1
[root@Node1 ~]# chown grid:asmadmin
/dev/sdb1
[root@Node1 ~]# chmod 660 /dev/sdb1
[root@Node1 ~]# chown grid:asmadmin
/dev/sdc1
[root@Node1 ~]# chmod 660 /dev/sdc1
[root@Node1 ~]# chown grid:asmadmin
/dev/sdd1
[root@Node1 ~]# chmod 660 /dev/sdd1
[root@Node1 ~]# chown grid:asmadmin
/dev/sde1
[root@Node1 ~]# chmod 660 /dev/sde1
[root@hostname ~]# fdisk
-l | grep dev
Disk /dev/nvme0n1: 100 GiB, 107374182400
bytes, 209715200 sectors
/dev/nvme0n1p1 * 2048
1050623 1048576 512M 83 Linux
/dev/nvme0n1p2 1050624 209715199 208664576 99.5G 8e
Linux LVM
Disk /dev/mapper/ol-root: 68.5 GiB,
73547120640 bytes, 143646720 sectors
Disk /dev/mapper/ol-swap: 16 GiB,
17179869184 bytes, 33554432 sectors
Disk /dev/mapper/ol-tmp: 15 GiB,
16106127360 bytes, 31457280 sectors
Disk /dev/sdc: 476.8 GiB, 511973523456
bytes, 999948288 sectors
/dev/sdc1 2048 999948287 999946240 476.8G 8e
Linux LVM
Disk /dev/sdd: 14.3 GiB, 15334375424
bytes, 29949952 sectors
/dev/sdd1 2048 29949951 29947904 14.3G 8e Linux
LVM
Disk /dev/sde: 14.3 GiB, 15334375424
bytes, 29949952 sectors
/dev/sde1 2048 29949951 29947904 14.3G 8e Linux
LVM
Disk /dev/sdb: 95.4 GiB, 102374572032
bytes, 199950336 sectors
/dev/sdb1 2048 199950335 199948288 95.4G 8e Linux
LVM
Disk /dev/sda: 14.3 GiB, 15334375424
bytes, 29949952 sectors
/dev/sda1 2048 29949951 29947904 14.3G 8e Linux
LVM
4)
Install Oracle Grid and Database
A)
Configure ssh for user “oracle” and “grid”
between Node1 and Node2
1. Generate SSH keys on the first node
Login to Node1 as the grid
software owner (usually oracle):
ssh-keygen -t rsa
- Press Enter for all prompts (no
passphrase).
- This creates ~/.ssh/id_rsa and
~/.ssh/id_rsa.pub.
2. Copy the public key to all nodes
On Node1:
ssh-copy-id grid@Node1
ssh-copy-id grid@Node2
B)
Install grid application
[grid@Node1
soft]$ unzip LINUX.X64_193000_grid_home.zip -d $ORACLE_HOME
[grid@Node1 soft]$ unzip p6880880_190000_Linux-x86-64.zip
-d $ORACLE_HOME
[grid@Node1 soft]$ unzip
gi_p37257886_190000_Linux-x86-64.zip -d $ORACLE_HOME
[grid@Node1 ~]$ mkdir -p /u01/app/oraInventory
[grid@Node1 ~]$ chown -R grid:oinstall
/u01/app/oraInventory
[grid@Node1 ~]$ chmod -R 775 /u01/app/oraInventory
[grid@Node1 soft]$ $ORACLE_HOME/oui/prov/resources/scripts/sshUserSetup.sh
-user grid -hosts "Node1 Node2" -advanced
[grid@Node1 ~]$ cd $ORACLE_HOME
cd cv/admin
vi cvu_config
CV_ASSUME_DISTID=OEL8
In Case Error: [INS-06006] Passwordless SSH connectivity
not set up between the following node(s): [node2]
change the scp file in both the RAC nodes.
# mv /usr/bin/scp /usr/bin/scp.orig
# vi /usr/bin/scp
# chmod 555 /usr/bin/scp
[grid@Node1 grid]$ export DISPLAY=192.168.0.87:0.0
[grid@Node1 grid]$ ./gridSetup.sh -applyRU 37257886
Preparing the home to patch...
Applying the patch 37257886...
Successfully applied the patch.
The log can be found at:
/tmp/GridSetupActions2025-09-28_08-16-03PM/installerPatchActions_2025-09-28_08-16-03PM.log
Launching Oracle Grid Infrastructure Setup Wizard...
Now we use 500GB for mgmt and Disk group name will change
to DATA
If error:
CRS-2676: Start of
'ora.cssdmonitor' on 'node1' succeeded
CRS-1705: Found 0
configured voting files but 1 voting files are required, terminating to ensure
data integrity; details at (:CSSNM00065:) in
/u01/app/grid_base/diag/crs/node1/crs/trace/ocssd.trc
CRS-2883: Resource
'ora.cssd' failed during Clusterware stack start.
CRS-4406: Oracle
High Availability Services synchronous start failed.
CRS-41053: checking
Oracle Grid Infrastructure for file permission issues
PRVH-0116 : Path
"/u01/app/grid/product/19C/grid/crs/install/cmdllroot.sh" with
permissions "rw-r--r--" does not have execute permissions for the
owner, file's group, and others on node "node1".
PRVG-2031 : Owner
of file "/u01/app/grid/product/19C/grid/crs/install/cmdllroot.sh" did
not match the expected value on node "node1". [Expected =
"grid(54322)" ; Found = "root(0)"]
PRVG-2032 : Group
of file "/u01/app/grid/product/19C/grid/crs/install/cmdllroot.sh" did
not match the expected value on node "node1". [Expected =
"oinstall(54321)" ; Found = "root(0)"]
CRS-4000: Command
Start failed, or completed with errors.
2025/10/14 23:24:15
CLSRSC-117: Failed to start Oracle Clusterware stack
Died at
/u01/app/grid/product/19C/grid/crs/install/crsinstall.pm line 1970.
[root@node1 bin]#
[root@node1 bin]# ls -l
/u01/app/grid/product/19C/grid/crs/install/cmdllroot.sh
-rw-r--r-- 1 root root 1286 Oct 14 23:09
/u01/app/grid/product/19C/grid/crs/install/cmdllroot.sh
[root@node1 bin]# chown grid:oinstall
/u01/app/grid/product/19C/grid/crs/install/cmdllroot.sh
[root@node1 bin]# chmod 755
/u01/app/grid/product/19C/grid/crs/install/cmdllroot.sh
[root@node1 bin]#
/u01/app/grid/product/19C/grid/crs/install/rootcrs.sh -verbose
5. Upon successfull installation, revert the change and
move the scp file back.
mv /usr/bin/scp.orig /usr/bin/scp
C)
Configure NTP
[root@hostname /]# service ntpd start
[root@hostname /]#
chkconfig ntpd on
[root@hostname /]#
vi /etc/ntp.conf
[root@hostname ~]#
vi /etc/sysconfig/ntpd
# Drop root to id
'ntp:ntp' by default.
OPTIONS="-u
ntp:ntp -p /var/run/ntpd.pid -g -x"
~
Restart NTP
[root@hostname ~]#
service ntpd stop
Shutting down
ntpd: [ OK ]
[root@hostname ~]#
service ntpd start
Starting ntpd: [ OK ]
Check Status
[root@hostname /]#
ntpq -p
[root@hostname /]#
ntpdc -c sysinfo
Update NTP Time
[root@hostname /]#
ntpdate -u 192.168.0.220
D)
Install Oracle database.
$ export DISPLAY=172.16.2.91:11.0
$ cd $ORACLE_HOME
$ ./runInstaller
E)
Patch update on Grid to 19.20
[root@hostname
soft]# chown grid:oinstall OPatch_ p6880880_190000_Linux-x86-64.zip
GI_p35319490_190000_Linux-x86-64.zip OJVM_p35354406_190000_Linux-x86-64.zip
[grid@hostname
soft]$ unzip OPatch_p6880880_190000_Linux-x86-64.zip -d $ORACLE_HOME
[root@hostname
soft]# unzip GI_p35319490_190000_Linux-x86-64.zip
[root@hostname
soft]# chown -R grid:oinstall 35319490
[grid@hostname
soft]$ ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail
-phBaseDir /u01/soft/35319490/35320081
[grid@hostname
soft]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail
-phBaseDir /u01/soft/35319490/35320149
[grid@hostname
soft]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail
-phBaseDir /u01/soft/35319490/35332537
[grid@hostname
soft]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail
-phBaseDir /u01/soft/35319490/35553096
[grid@hostname soft]$ $ORACLE_HOME/OPatch/opatch
prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/soft/35319490/33575402
a)
Step 1 Stop has
[root@T24UATDB 19c]# chown -R grid:oinstall
/u01/app/grid/product/19c/grid
[root@T24UATDB 19c]# crsctl stop has
b)
Step 2, apply patch
1----35320081
[grid@hostname ~]$ cd
/u01/soft/35319490/35320081
[grid@hostname 35320081]$
$ORACLE_HOME/OPatch/opatch apply
2----35320149
[grid@hostname ~]$ cd
/u01/soft/35319490/35320149
[grid@hostname 35320149]$
$ORACLE_HOME/OPatch/opatch apply
3----35332537
[root@T24UATDB
19c]# chown -R grid:oinstall /u01/app/grid/product/19c/grid
[root@T24UATDB
19c]# crsctl stop has
[grid@hostname ~]$ cd
/u01/soft/35319490/35332537
[grid@hostname 35332537]$
$ORACLE_HOME/OPatch/opatch apply
4----35553096
[grid@hostname ~]$ cd
/u01/soft/35319490/35553096
[grid@hostname 35553096]$
$ORACLE_HOME/OPatch/opatch apply
5----33575402
[grid@hostname ~]$ cd
/u01/soft/35319490/33575402
[grid@hostname 33575402]$
$ORACLE_HOME/OPatch/opatch apply
6----35354406
[grid@hostname ~]$ cd
/u01/soft/35354406
[grid@hostname 35354406]$
$ORACLE_HOME/OPatch/opatch apply
c)
Step3, Post Patch
For Oracle Grid
Infrastructure for a standalone server
Log in as root
# $ORACLE_HOME/crs/install/roothas.sh
-unlock
# $ORACLE_HOME/crs/install/roothas.sh -postpatch
d)
Step4, Verify patch
$ $ORACLE_HOME/bin/kfod
op=patches
---------------
List of Patches
===============
33575402
35320081
35320149
35332537
35354406
35553096
$ $ORACLE_HOME/bin/kfod
op=patchlvl
-------------------
Current Patch level
===================
1599144697
F)
Patch update on Oracle DB
[oracle@hostname soft]$ unzip OPatch_ p6880880_190000_Linux-x86-64.zip -d
$ORACLE_HOME
1----35320081
[oracle@hostname ~]$
cd /u01/soft/35319490/35320081
[oracle@hostname 35320081]$
$ORACLE_HOME/OPatch/opatch apply
2----35320149
[oracle@hostname ~]$
cd /u01/soft/35319490/35320149
[oracle@hostname 35320149]$
$ORACLE_HOME/OPatch/opatch apply
3----35354406
[oracle@hostname ~]$
cd /u01/soft/35354406
[oracle@hostname 35354406]$
$ORACLE_HOME/OPatch/opatch apply
G)
Configure ASM
[grid@hostname
~]$ asmca
H)
Create database by GUI
[oracle@hostname
~]$ dbca
5)
How stop RAC Database Hostname
A)
Stop Database Instances
The process of
shutdown or restart DB server starts with stopping the database instance
running on database node. So, first of all DBA has to stop database instance
running on this node. This will not make an impact on database since database
is accessible through other instances in RAC env. Before stopping database
instance make sure another instance is running other server.
[grid@hostname~]$ srvctl status
database -d racdb
Instance racdb1 is running on node hostname
Instance racdb2 is running on node node2
[grid@hostname~]$ srvctl stop
instance -d racdb –i racdb1
[grid@hostname~]$ srvctl status
database -d racdb
Instance racdb1 is not running on node hostname
Instance racdb2 is running on node node2
Now Database racdb is running on dbnode2 having instance
name racdb2. If this server has more than one database instance running on this
node use same method to stop each instance.
B)
Stop Node Level Applications
If DBA has
some node level application configured, then stop them using below:
[grid@hostname ~]$ srvctl status nodeapps -n hostname
VIP hostname-vip is enabled
VIP hostname-vip is running on node: hostname
Network is enabled
Network is running on node: hostname
GSD is disabled
GSD is not running on node: hostname
ONS is enabled
ONS daemon is running on node: hostname
[gird@hostname ~]$ srvctl stop nodeapps -n hostname -f
[grid@hostname ~]$ srvctl status nodeapps -n hostname
VIP hostname-vip is enabled
VIP hostname-vip is not running
Network is enabled
Network is not running on node: hostname
GSD is disabled
GSD is not running on node: hostname
ONS is enabled
ONS daemon is not running on node: hostname
C)
Stop Running ASM Instances
ASM instance
is a bridge between Database instance running on database node and database
stored on shared server. In order to stop DB server DBA has to stop AS instance
as well.
[grid@hostname ~]$ srvctl
status asm -n hostname
ASM is running on hostname
[grid@hostname ~]$ srvctl stop
asm -n hostname -f
[grid@hostname ~]$ srvctl
status asm -n hostname
ASM is not running on hostname
D)
Stop Listener on Database Server
Listener is
used to listen requests coming for new connections, so before stooping database
server we have to stop listener on the server so that it doesn't take new
connection requests.
[grid@hostname ~]$ srvctl
status listener –n hostname
Listener LISTENER is enabled on node(s): hostname
Listener LISTENER is running on node(s): hostname
[grid@hostname ~]$ srvctl stop
listener -n hostname
[grid@hostname ~]$ srvctl
status listener -n hostname
Listener LISTENER is enabled on node(s): hostname
Listener LISTENER is not running on node(s): hostname
Now all components from database side
are stopped, DBA can move forward to restart or shutdown database server.
E)
Restart or shutdown database server
To shutdown or restart database
server, DBA has to have root user login credentials.
To Restart Linux Database Server.
[root@oracle]$ init 6
To Shutdown database server.
[root@oracle]$ init 0