Installing Oracle Database 11g and Grid ASM 18c on VM VirtualBox
Installing Oracle Database 11g and Grid ASM 18c on VM VirtualBox
192.168.56.105 dbtest01
192.168.56.106 dbtest02
Node1: name don’t set underscore (_) point(.) (-) both nodes
# vi /etc/sysctl.conf
kernel.hostname=dbtest01
# vi /etc/hostname
dbtest01
Node2
# vi /etc/sysctl.conf
kernel.hostname=dbtest02
# vi /etc/hostname
dbtest02
lo enp0s3,enp0s8,enp0s9
lo enp0s3,enp0s8,enp0s9
# ifconfig -a
- Configure heartbeat (Note: in case of network cable for heartbeat already plug-in but interface
not up, use command ifup interface_name (Ex: ifup ifcfg-enp0s8))
- Disable virtual interface unnecessary to use(virbr0)
Node1
# vi /etc/sysconfig/network-scripts/ifcfg-enp0s8
TYPE=Ethernet
BOOTPROTO=static
NAME=enp0s8
DEVICE=enp0s8
ONBOOT=yes
IPADDR=192.168.222.1
NETMASK=255.255.255.252
# vi /etc/sysconfig/network-scripts/ifcfg-enp0s9
TYPE=Ethernet
BOOTPROTO=static
NAME=enp0s9
DEVICE=enp0s9
ONBOOT=yes
IPADDR=192.168.223.1
NETMASK=255.255.255.252
# vi /etc/sysconfig/network-scripts/ifcfg-enp0s8
TYPE=Ethernet
BOOTPROTO=static
NAME=enp0s8
DEVICE=enp0s8
ONBOOT=yes
IPADDR=192.168.222.2
NETMASK=255.255.255.252
# vi /etc/sysconfig/network-scripts/ifcfg-enp0s9
TYPE=Ethernet
BOOTPROTO=static
NAME=enp0s9
DEVICE=enp0s9
ONBOOT=yes
IPADDR=192.168.223.2
NETMASK=255.255.255.252
#Private
#Virtual
#Scan
192.168.56.109 dbtest12-scan
# vi /etc/sysconfig/selinux
SELINUX=disabled
# sestatus
vi /etc/sysctl.conf
##Oracle setting
vm.swappiness = 1
vm.dirty_background_ratio = 3
vm.dirty_ratio = 80
vm.dirty_expire_centisecs = 500
vm.dirty_writeback_centisecs = 100
kernel.shmmax = 4398046511104
kernel.shmall = 1073741824
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
# fs.file-max needs to be set to at least 6815744 for Oracle Installation.
fs.file-max = 6815744
Login as oracle user and add more the following line setting into bash_profile
$ vi ~/.bash_profile
# Oracle Settings
export ORACLE_BASE=/u01/app/oracle;
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1;
export ORACLE_SID=dbtest2;
export ORACLE_TERM=xterm;
export GRID_HOME=/u01/18.0.0/grid
export PATH=$ORACLE_HOME/bin:$GRID_HOME/bin:$PATH:/usr/sbin;
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;
export TNS_ADMIN=$ORACLE_HOME/network/admin
ulimit -p 16384
ulimit -n 65536
else
fi
fi
export TMP=/tmp;
export TMPDIR=$TMP;
export GRID_BASE=/u01/app/grid
export ORACLE_BASE=$GRID_BASE;
export GRID_HOME=/u01/18.0.0/grid
export ORACLE_HOME=$GRID_HOME;
export ORACLE_SID=+ASM2
Save and exit
3.export PATH=$GRID_HOME/bin:$PATH:/usr/sbin;
Create Directories both nodes
Login:
export root
LD_LIBRARY_PATH=$GRID_HOME/lib;
mkdir -p /u01/app/oraInventory
chown -R grid:oinstall /u01/app/oraInventory
chmod -R 775 /u01/app/oraInventory
mkdir -p /u01/app/grid
mkdir -p /u01/app/grid/cfgtoollogs
mkdir -p /u01/18.0.0/grid
mkdir -p /u01/app/grid/cfgtoollogs
chown -R grid:oinstall /u01
chmod -R 775 /u01/app/grid
chown -R grid:oinstall /u01/app/grid
chmod -R 775 /u01/app/grid
chown -R grid:oinstall /u01/18.0.0/grid
chmod -R 775 /u01/18.0.0/grid
mkdir -p /u01/app/oracle
mkdir -p /u01/app/oracle/cfgtoollogs
chown -R oracle:oinstall /u01/app/oracle
chmod -R 775 /u01/app/oracle
mkdir -p /u01/app/oracle/product/11.2.0/db_1
chown -R oracle:oinstall /u01/app/oracle/product/11.2.0/db_1
chmod -R 775 /u01/app/oracle/product/11.2.0/db_1
4. Configure ssh between two nodes (not to ask for password when using ssh)
5.1 Login as oracle user
$ mkdir ~/.ssh
Prepared by SUOS Dara 12/2022
$ chmod 755 ~/.ssh
$ /usr/bin/ssh-keygen -t rsa
type enter until finish
$ /usr/bin/ssh-keygen -t dsa
Copy contents in file authorized_keys (more ~/.ssh/authorized_keys) on node1 and add into
node2. After that, before copy file authorized_keys from node 2 into node 1 pls run script
(node2) by exsample below and then copy authorized_keys
$ /usr/bin/ssh-keygen -t rsa
type enter until finish
$ /usr/bin/ssh-keygen -t dsa
IV. Create disks shareable (on both nodes) (by root user)
Planning for Grid Infrastructure 18c
Refer this link
https://www.dell.com/support/kbdoc/en-ae/000179544/how-to-deploy-oracle-18c-grid-and-
standalone-database-on-red-hat-enterprise-linux-7-x
Ex: Create CRS disk >> choose VDI (Virtualbox disk image) >> Fixed size >> create
This will configure the on-boot properties of the Oracle ASM library
loaded on boot and what permissions it will have. The current values
*If its status shown “no”, run the below command and check its status again.
# oracleasm init
Note: After fdisk not show /dev/sdx1 => create disk fail. Run command below to refresh
disk partition.
# partprobe /dev/sdx*
CRS001
CRS002
CRS003
DATA
REDOLOG01
REDOLOG02
3. Install package
login root
cd /u01/18.0.0/grid/cv/rpm
cd /home/grid
- login as grid user by interface mode (install only on node1) by x Brower manager
$ cd /u01/18.0.0/grid
$ ./gridSetup.sh &
On the select configuration option => choose Configure Oracle Grid Infrastructure for a New
Cluster
Click OK
Privilege OS group
Create inventory
Prerequisite Checks
Summary
Install finish
Create… =>Disk Group Name: ARCHIVED => External => Select Disk Path
/dev/oralceasm/disks/ARCHIVED => OK
Can leave the mail blank and uncheck I wish to receive security update via…… => Next
erpbccs01, erpbccs02
$ vi $ORACLE_HOME/sysman/lib/ins_emagent.mk
o Execute script as in pop-up window appeared by root user (on both nodes)
# /u01/app/oracle/product/11.2.0/db_1/root.sh
Note: run script on node1 then node2.
=> OK