1- Build Linux Server of Oracle Linux 8 with 8 GB RAM and /u01 of 50 GB with 2 RAW disks of 50
GB each for creation of ASM disks .
2- Start by installing required packages using yum repository
yum -y install oracle-database-preinstall-19c.x86_64
yum -y install wget oracleasm kmod-oracleasm oracleasm-support
3- It's nice keep your Linux system up-to-date
yum -y update
yum clean all
4- Add group and directories
[root@ABC~]# groupadd oinstall
[root@ABC ~]# groupadd dba
[root@ABC ~]# groupadd oper
[root@ABC ~]# groupadd oracle
[root@ABC ~]# useradd -g oinstall -G dba,oper oracle
[root@ABC ~]# /usr/sbin/usermod -g oracle -G oracle,oinstall,dba,oper oracle
[root@ABC ~]# cat /etc/group |grep oracle
oracle:x:1012:oracle
oinstall:x:1013:oracle
dba:x:1014:oracle
oper:x:1015:oracle
create directories for grid home, oracle home and oracle inventory
make /u01 of 50 GB
----------------------------------------------------------------------------------------------------
[root@ ABC oracle]# mkdir -p /u01/oracle/19.0.0/grid
[root@ ABC oracle]# mkdir -p /u01/oracle/product/19.0.0/dbhome_1
[root@ ABC oracle]# mkdir -p /u01/oraInventory
Give ownership of each directory to oracle users
------------------------------------------------------------------------------------------------------
[root@ ABC ~]# chown -R oracle:oinstall /u01
[root@ ABC ~]# chown -R oracle:oinstall /u01/oracle/19.0.0/grid
[root@ ABC ~]# chown -R oracle:oinstall /u01/oraInventory
[root@ ABC ~]# chown -R /u01/oracle/product/19.0.0/dbhome_1
5- Create RAW and ASM Disks
[root@ABC Setup_Rpm]# fdisk -l
Disk /dev/sdb: 50 GiB,
Disk /dev/sdc: 50 GiB,
[root@ABC ~]# fdisk /dev/sdb
[root@ABC ~]# fdisk /dev/sdc
now create disks as below
**********************************
[root@ABC ~]# oracleasm createdisk DATA01 /dev/sdb
Writing disk header: done
Instantiating disk: done
[root@ABC ~]# oracleasm createdisk DATA02 /dev/sdc
Writing disk header: done
Instantiating disk: done
[root@ABC]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
Instantiating disk "DATA02"
Instantiating disk "DATA01"
[root@ABC ~]# oracleasm listdisks
DATA01
DATA02
6- Software download RDBMS and Grid(ASM)
Oracle Database 19c Download for Linux x86-64 | Oracle India
Oracle Database 19c (19.3) for Linux x86-64
Oracle Database 19c Grid Infrastructure (19.3) for Linux x86-64
7- Install Oracle 19c Grid
**************************
Switch to oracle user and edit the .bash_profile
-------------------------------------------------------------------------------------------------------
# User specific environment and startup programs
export ORACLE_BASE=/u01/oracle
export ORACLE_HOME=/u01/oracle/19.0.0/grid
PATH=$PATH:$HOME/.local/bin:$ORACLE_HOME/bin
export PATH
Create a function under .bashrc file so we can use it to quickly set environment variables for
ASM instance
-------------------------------------------------------------------------------------------------------
vi .bashrc
Put below at the end of the file
ASM()
{
export ORACLE_SID=+ASM
echo "ORACLE_SID="$ORACLE_SID
echo "ORACLE_BASE="$ORACLE_BASE
echo "ORACLE_HOME="$ORACLE_HOME
}
The ASM function will help us quickly set ORACLE_SID=+ASM so we don't have to export it
manually
Download Oracle 19c grid and copy the 19c software file to ORACLE_HOME location
and unzip.
Start the run installer to perform installation
-------------------------------------------------------------------------------------------------------
[root@ABC ~]# cd /u01/oracle/19.0.0/grid/cv/rpm/
[root@ABC rpm]# pwd
/u01/oracle/19.0.0/grid/cv/rpm
[root@ABC rpm]# ls -lrth
total 12K
-rw-r--r-- 1 oracle oracle 12K Mar 13 2019 cvuqdisk-1.0.10-1.rpm
[root@ABC rpm]# rpm -ivh cvuqdisk-1.0.10-1.rpm
Verifying... ################################# [100%]
Preparing... ################################# [100%]
Using default group oinstall to install package
Updating / installing...
1:cvuqdisk-1.0.10-1 ################################# [100%]
[root@ABC rpm]#
[oracle@ABC rpm]$ cd ..
[oracle@ABC cv]$ cd ..
[oracle@ABC grid]$ cat /etc/os-release | grep VERSION_ID | awk -F"\"" '{print $2}'
8.9
[oracle@ABC grid]$ export CV_ASSUME_DISTID=OEL8.9
[oracle@ABC grid]$
[oracle@ABC grid]$
[oracle@ABC grid]$
[oracle@ABC grid]$ ./runcluvfy.sh stage -pre hacfg -fixup -verbose
Verifying Physical Memory ...
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
ABC 62.0406GB (6.5054268E7KB) 8GB (8388608.0KB) passed
Verifying Physical Memory ...PASSED
Verifying Available Physical Memory ...
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
ABC 60.9777GB (6.3939744E7KB) 50MB (51200.0KB) passed
Verifying Available Physical Memory ...PASSED
Verifying Swap Size ...
Node Name Available Required Status
------------ ------------------------ ------------------------ ----------
ABC 125GB (1.31071996E8KB) 16GB (1.6777216E7KB) passed
Verifying Swap Size ...PASSED
Verifying Free Space: ABC:/usr,ABC:/var,ABC:/etc,ABC:/sbin,ABC:/tmp ...
Path Node Name Mount point Available Required Status
---------------- ------------ ------------ ------------ ------------ ------------
/usr ABC / 47.0576GB 25MB passed
/var ABC / 47.0576GB 5MB passed
/etc ABC / 47.0576GB 25MB passed
/sbin ABC / 47.0576GB 10MB passed
/tmp ABC / 47.0576GB 1GB passed
Verifying Free Space: ABC:/usr,ABC:/var,ABC:/etc,ABC:/sbin,ABC:/tmp ...PASSED
Verifying User Existence: oracle ...
Node Name Status Comment
------------ ------------------------ ------------------------
ABC passed exists(1011)
Verifying Users With Same UID: 1011 ...PASSED
Verifying User Existence: oracle ...PASSED
Verifying Group Existence: dba ...
Node Name Status Comment
------------ ------------------------ ------------------------
ABC passed exists
Verifying Group Existence: dba ...PASSED
Verifying Group Membership: dba ...
Node Name User Exists Group Exists User in Group Status
---------------- ------------ ------------ ------------ ----------------
ABC yes yes yes passed
Verifying Group Membership: dba ...PASSED
Verifying Run Level ...
Node Name run level Required Status
------------ ------------------------ ------------------------ ----------
ABC 3 3,5 passed
Verifying Run Level ...PASSED
Verifying Users With Same UID: 0 ...PASSED
Verifying Current Group ID ...PASSED
Verifying Root user consistency ...
Node Name Status
------------------------------------ ------------------------
ABC passed
Verifying Root user consistency ...PASSED
Pre-check for Oracle Restart configuration was successful.
CVU operation performed: stage -pre hacfg
Date: Apr 15, 2024 2:53:18 PM
CVU home: /u01/oracle/19.0.0/grid/
User: oracle
[oracle@ABC grid]$
[oracle@ABC ~]$
[oracle@ABC ~]$ cd $ORACLE_HOME
[oracle@ABC grid]$ ls -lrth *.sh
-rwxr-x--- 1 oracle oracle 628 Sep 4 2015 runcluvfy.sh
-rwxr-x--- 1 oracle oracle 3.3K Mar 8 2017 gridSetup.sh
-rwx------ 1 oracle oracle 414 Apr 18 2019 rootupgrade.sh
-rwx------ 1 oracle oracle 405 Apr 18 2019 root.sh
Enable GUI Display
[oracle@ABC grid]$
[oracle@ABC grid]$ ./gridSetup.sh
Launching Oracle Grid Infrastructure Setup Wizard...
follow all the steps on GUI
**************************************
The response file for this session can be found at:
/u01/oracle/19.0.0/grid/install/response/grid_*******.rsp
You can find the log of this install session at:
/tmp/GridSetupActions******/gridSetupActions**********.log
run root.sh and orainstroot.hh
***************************************s
[root@ABC ~]#
[root@ABC ~]# /u01/oraInventory/orainstRoot.sh
Changing permissions of /u01/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/oraInventory to oracle.
The execution of the script is complete.
[root@ABC ~]# /u01/oracle/19.0.0/grid/root.sh
Verify ASM instance will be shown up and running
[oracle@ABC grid]$ ps -ef|grep smon
oracle 129420 1 0 13:13 ? 00:00:00 asm_smon_+ASM
oracle 692233 12010 0 18:55 pts/2 00:00:00 grep --color=auto smon
8- Start Oracle Database Installation :
[oracle@ABC ~]$ cat .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
export ORACLE_BASE=/u01/oracle
ORACLE_HOME=/u01/oracle/product/19.0.0/dbhome_1
PATH=$PATH:$HOME/.local/bin:$ORACLE_HOME/bin
export PATH
[oracle@ABC ~]$
add below function in bashrc
QSLGNXT()
{
export ORACLE_SID=QSLGNXT
echo "ORACLE_SID="$ORACLE_SID
echo "ORACLE_BASE="$ORACLE_BASE
echo "ORACLE_HOME="$ORACLE_HOME
}
cd $ORACLE_HOME
unzip LINUX.X64_193000_db_home.zip
#for GUI installation
./runInstaller
follow the GUI steps and setup software only
After this select Entreprise Edition
Then go as per default setting and click next
[oracle@ABC dbhome_1]$ sudo su -
[sudo] password for oracle:
Last login: Wed May 1 11:59:47 CEST 2024 on pts/1
[root@ABC ~]#
[root@ABC ~]#
[root@ABC ~]# /u01/oracle/product/19.0.0/dbhome_1/root.sh