top of page

Installing Oracle 19C RAC Database


ree

This writing explains installing Oracle High Availability solution Real Application Clusters (RAC) with VMware 15.5 on the Oracle Linux 7.9 operating system. You need 2 servers, 2 ethernet cards in each server and shared disks that can be seen by servers for installing RAC. You may download the needed files here.


ree

Installation has 6 phases:

• Installing the Operating System and Preparing the Servers

• Configuring the Disks with Oracleasm

• Installation Phase 1- Installing Grid

• Installation Phase 2- Installing Oracle Software

• Installation Phase 3- Adding Disk Group with asmca

• Installation Phase 4- Creating Database with DBCA



1- Installing the Operating System and Preparing the Servers


The operating system is installed as we told in our post “Installing Oracle Linux 7.9 on Virtual Server (VMware 15.5)”.

I’ll continue by cloning the server. If you wish, you may continue with the server you’ve installed.


Right click on the server you’ve installed and click “Manage > Clone”.


ree

ree

Click “The current state in the virtual machine”.


ree

Click “Create a full clone”.


ree

Name the clone. In the installation, I name my servers as “data4tech01” and “data4tech02”.


ree

Click “Power on this virtual machine” and boot the server.


ree

Upon booting the server, update the operating system and download the packages needed in the installation.

# yum -y update
# yum install -y oracle-database-preinstall-19c.x86_64
# yum install -y oracleasm-support
# yum install -y dnsmasq*

I’ve cloned my server, thus hostname is the same with the server I’ve cloned. Change the hostname.

# vi /etc/hostname
ree

Disable "Secure Linux".

# vi /etc/selinux/config
SELINUX=disabled
ree

Stop and disable “Firewall” service.

# systemctl stop firewalld.service
# systemctl disable firewalld.service
ree

We’ll add 2 ethernet cards to our server, that’s why we shut down the server.

# shutdown -h now

Click "Edit virtual machine settings".


ree

Click “Add”.


ree

Select “Network Adapter” and click “Next”.


ree

Add 2 ethernet cards in the same way too and adjust both as “host-only”.


ree

Boot the server.

Ethernet cards are added to the server as “ens37” and “ens38”. Click “connect” for both of them.


ree

Manage settings for “ens37”. This card will be used for “public network”.


ree


ree


Manage settings for “ens38”. This card will be used for “private network”.


ree

Reboot the server.

# reboot

Upon booting the server, edit the file /etc/hosts.

# vi /etc/hosts
ree

Since we’ll set up a small scaled system or a test environment, we’ll use “dnsmasq” for the name resolution service. First, enable “dnsmasq” service in order to boot the service automatically when the server is rebooted.

# systemctl enable dnsmasq

Then, add the line below to the end of the file /etc/dnsmasq.conf.

# vi /etc/dnsmasq.conf
local=/localdomain/

In the servers which will do name resolution, enter the server address where you’ve configured “dnsmasq” to the /etc/resoly.conf file.


ree

Since we’ve configured “dnsmasq” on the 1. Node, edit and lock the file as in the picture.

# chattr +i /etc/resolv.conf

Reboot the server.

# reboot

Check the resolution of scan IPs.

# nslookup data4tech-scan

ree

Network configuration is done for the first server and by cloning the first, we’ll create the second server. Then, we’ll add the disks that can be seen jointly by the servers. I’ve created a folder named “ORACLE SHARED FOLDER” in the index where virtual machines are installed, I’ll create the disks here. You may create them wherever you want. I introduce the folder I’ve created as the way the first server can see it.


ree

Click “Next” and continue.

ree

Select the index where you’ve created the folder.


ree

Select “Enable this share”.


ree

You’ve created the folder. Now, clone the machine you’ve configured just as you did at the beginning. (We’ll clone data4tech01. I don’t tell these steps because I’ve told above.)

Upon cloning, boot the server and change the hostname.

# vi /etc/hostname
ree

Edit IP addresses of the server.

Manage the settings for "ens37".


ree

Manage the settings for “ens38”.


ree

Reboot the server.

# reboot

Check if the second server too does name resolution.

# nslookup data4tech-scan
ree

Check the communication between the servers.

In the 1st server:

# ping data4tech02
# ping data4tech02-priv
ree
ree

In the 2nd server:

# ping data4tech01
# ping data4tech01-priv
ree
ree

Add the disks that can be seen jointly by the servers to the folder you’ve created before. Since I’ll create 2 disk groups, I’ll add two 20 GB disks. Shut down both servers.

# shutdown -h now

Click “Edit virtual machine settings”.


ree

Click “Add” and then “Hard Disk”.


ree

Select “SCSI”.


ree

Create a new virtual disk and continue.


ree

Click “Allocate all disk space now” and “Next”.


ree

I create the first disk named “OCR” in the folder I’ve created before.


ree

We’ve created the first disk, let’s add one more disk named “DATA” in that index in the same way.


ree

We’ve added the disks for the first server. Add those disks for the first server too. Click “Edit virtual machine settings”.


ree

Upon clicking “Add”, select “Hard Disk”.


ree

Select “SCSI”.


ree

Click “Use an existing virtual disk”.


ree

Choose the disk you’ve added before and continue by clicking “Finish”.


ree

Do the same for the other disk too.


In RAC, both servers should be able to write disks. When you boot one of the servers, VMware will automatically lock the disks you’ve added and prevent the other server from booting. To refrain from that situation, you need to make some arrangements in the index where virtual servers are in.

Open the files “Data4tech01.vmx” and “Data4tech02.vmx” with notepad++ in the index where virtual servers are installed and add the lines below to the end.

disk.locking = "FALSE"
diskLib.dataCacheMaxSize = "0"
disk.enableuuid = "TRUE"
bios.bootdelay = "8000"
ree

2- Configuring the Disks with Oracleasm


Check the disks you’ve added.

# ls -al /dev/sd*

/dev/sda

/dev/sda1

/dev/sda2

/dev/sdb

/dev/sdc

sdb” and “sdc” are the disks we’ve added. We’ll partition those disks with “fdisk” command. (Do it just on the 1st server)


Partitioning sdb:


ree

Partitioning sdc:


ree

You see the partitions created as “sdb1” and “sdc1”.

# ls /dev/sd*
ree

Configure Oracle ASM Library and stamp the disks for ASM.


Configure Oracleasm.

1st Server:

# oracleasm configure -i 

Configuring the Oracle ASM library driver. This will configure the on-boot properties of the Oracle ASM library driver. The following questions will determine whether the driver is loaded on boot and what permissions it will have. The current values will be shown in brackets (‘[]’). Hitting <ENTER> without typing an answer will keep that current value. Ctrl-C will abort. Default user to own the driver interface []: oracle Default group to own the driver interface []: oinstall Start Oracle ASM library driver on boot (y/n) [n]: y Scan for Oracle ASM disks on boot (y/n) [y]: y Writing Oracle ASM library driver configuration: done


Check the parameters.

# oracleasm configure
ree

# oracleasm init

Creating /dev/oracleasm mount point: /dev/oracleasm Loading module “oracleasm”: oracleasm Configuring “oracleasm” to use device physical block size Mounting ASMlib driver filesystem: /dev/oracleasm

# oracleasm createdisk OCR /dev/sdb1

Writing disk header: done

Instantiating disk: done

# oracleasm createdisk DATA /dev/sdc1

Writing disk header: done

Instantiating disk: done

# oracleasm scandisks
# oracleasm listdisks
ree

2nd Server:

# oracleasm configure -i 

Configuring the Oracle ASM library driver. This will configure the on-boot properties of the Oracle ASM library driver. The following questions will determine whether the driver is loaded on boot and what permissions it will have. The current values will be shown in brackets (‘[]’). Hitting <ENTER> without typing an answer will keep that current value. Ctrl-C will abort. Default user to own the driver interface []: oracle Default group to own the driver interface []: oinstall Start Oracle ASM library driver on boot (y/n) [n]: y Scan for Oracle ASM disks on boot (y/n) [y]: y Writing Oracle ASM library driver configuration: done

# oracleasm init

Creating /dev/oracleasm mount point: /dev/oracleasm Loading module “oracleasm”: oracleasm Configuring “oracleasm” to use device physical block size Mounting ASMlib driver filesystem: /dev/oracleasm

# oracleasm scandisks
# oracleasm listdisks
ree

3- Installation Phase 1- Installing Grid


Create the folder indexes in both servers. To move the files needed in the installation, I create an index named “/u01/oraInstall”. If you wish, you can move installation files somewhere else.

# mkdir -p /u01/app/19/grid
# mkdir -p /u01/app/oracle/product/19/db_1
# mkdir -p /u01/oraInstall
# chown -R oracle:orainstall /u01
# chmod -R 775 /u01

Change the password of the Oracle user. (on both servers)

# passwd oracle

Switch to Oracle user and create profile files.

1st Server:

# su - oracle
$ vi .profile_crs
$ vi .profile_db
[oracle@data4tech01 ~]$ cat .profile_crs 

ORACLE_SID=+ASM1; export ORACLE_SID

GRID_HOME=/u01/app/19/grid; export GRID_HOME

ORACLE_HOME=$GRID_HOME; export ORACLE_HOME

PATH=$ORACLE_HOME/bin:$PATH:$HOME/bin:/usr/sbin; export PATH


LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH

CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATHexport CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib


[oracle@data4tech01 ~]$ cat .profile_db

ORACLE_HOSTNAME=data4tech01.localdomain; export ORACLE_HOSTNAME

ORACLE_SID=orcl1; export ORACLE_SID

ORACLE_UNQNAME=orcl; export ORACLE_UNQNAME

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE

ORACLE_HOME=/u01/app/oracle/product/19/db_1; export ORACLE_HOME

ORACLE_TERM=xterm; export ORACLE_TERM


TMP=/tmp; export TMP

TMPDIR=$TMP; export TMPDIR


PATH=$ORACLE_HOME/bin:$PATH:$HOME/bin:/usr/sbin; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH

CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH


2nd Server:

# su - oracle
$ vi .profile_crs
$ vi .profile_db
[oracle@data4tech02 ~]$ cat .profile_crs

ORACLE_SID=+ASM2; export ORACLE_SID

GRID_HOME=/u01/app/19/grid; export GRID_HOME

ORACLE_HOME=$GRID_HOME; export ORACLE_HOME

PATH=$ORACLE_HOME/bin:$PATH:$HOME/bin:/usr/sbin; export PATH


LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH

CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATHexport CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

[oracle@data4tech02 ~]$ cat .profile_db

ORACLE_HOSTNAME=data4tech02.localdomain; export ORACLE_HOSTNAME

ORACLE_SID=orcl2; export ORACLE_SID

ORACLE_UNQNAME=orcl; export ORACLE_UNQNAME

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE

ORACLE_HOME=/u01/app/oracle/product/19/db_1; export ORACLE_HOME

ORACLE_TERM=xterm; export ORACLE_TERM


TMP=/tmp; export TMP

TMPDIR=$TMP; export TMPDIR


PATH=$ORACLE_HOME/bin:$PATH:$HOME/bin:/usr/sbin; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH

CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH


Upon creating the profiles, start chrony service on both servers.

# systemctl enable chronyd
# systemctl restart chronyd

Move the installation files you’ve downloaded to the /u01/oraInstall in the 1st server.

# chown oracle.oinstall /u01/oraInstall/LINUX*
# chmod 777 /u01/oraInstall/LINUX*
ree

Unzip with the Oracle user.

$ unzip LINUX.X64_193000_grid_home.zip -d /u01/app/19/grid/

Install “cvuqdisk” with root user. (on both servers)

# rpm -Uvh cvuqdisk-1.0.10-1.rpm
ree

Since we unzipped in the first server, “cvuqdisk rpm” isn’t in the second server. That’s why we send it with scp and install.

# scp cvuqdisk-1.0.10-1.rpm root@data4tech02:/tmp
ree

Go to index /tmp in the 2nd server and install.

# cd /tmp
# rpm -Uvh cvuqdisk-1.0.10-1.rpm

Start the installation in the 1st server. Reboot it before starting. Log in with the Oracle user.

$ cd /u01/app/19/grid
$ ./gridSetup.sh

Start the installation by clicking “Configure Oracle Grid Infrastructure for a New Cluster”.

ree

Click “Configure an Oracle Standalone Cluster”.


ree

Choose names for Cluster and Scan. Cluster name shouldn’t be longer than 15 characters, otherwise you encounter fault during installation. (Root.sh step 16)


ree

Add the information of the 2nd server.


ree

Test SSH connectivity, if there’s no connection click “Setup”.


ree

If there isn’t SSH connectivity between the servers, write password of the Oracle user and make the interface create connection.


ree

Define the network configuration. I’ve told you before that we’ll use public network for “ens37” and private network for “ens38”.

ree

Click “Use Oracle Flex ASM for storage”.


ree

Click “No”.


ree

Choose the index, where you’ve defined the disks, with Change Discovery Path. Make the Disk Group Name OCR. Select External in Redundancy.

High Redundancy: Data is stored with 3 different copies. No data loss even 2 groups crash.

Normal Redundancy: Data is stored with 2 different copies. No data loss even the other group crashes.

External Redundancy: Data is stored with only a copy. It’s better if you store systems in normal redundancy disk groups.


ree

Choose the passwords. You can choose a different password, I’ll use the same.


ree

Click “Do not use Intelligent Platform Management Interface (IPMI)”.


ree

Click “Next” since we won’t use EM Cloud Control.


ree

Adjust the groups.


ree

Check if the Oracle Base index is correct.


ree

Click “Next”.


ree

I suggest running the scripts manually but since this is a test environment, we’ll run them automatically.


ree

No problem seen in pre-check, NTP may be ignored. Since we chose the swap size 4 GB when installing the server, we encountered fault. It should have been 8 GB. Click “Next” and start installation.

To increase swap size, you may check our post “Increasing Swap Space in Linux Operating System".


ree

Click “Install” and start the installation.


ree

It asks for permission to run the scripts automatically. Click “Yes” and allow it.


ree

! You may encounter the “PRVG-13606” fault at the end of the installation, it’s about NTP you may ignore it.


ree

This is how installing Grid ends.


Set the .profile_crs you’ve created with the Oracle user.

$ . .profile_crs
$ crsctl stat res -t

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

Name Target State Server State details

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

Local Resources

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

ora.LISTENER.lsnr

ONLINE ONLINE data4tech01 STABLE

ONLINE ONLINE data4tech02 STABLE

ora.chad

ONLINE ONLINE data4tech01 STABLE

ONLINE ONLINE data4tech02 STABLE

ora.net1.network

ONLINE ONLINE data4tech01 STABLE

ONLINE ONLINE data4tech02 STABLE

ora.ons

ONLINE ONLINE data4tech01 STABLE

ONLINE ONLINE data4tech02 STABLE

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

Cluster Resources

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

ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)

1 ONLINE ONLINE data4tech01 STABLE

2 ONLINE ONLINE data4tech02 STABLE

3 ONLINE OFFLINE STABLE

ora.LISTENER_SCAN1.lsnr

1 ONLINE ONLINE data4tech01 STABLE

ora.LISTENER_SCAN2.lsnr

1 ONLINE ONLINE data4tech02 STABLE

ora.LISTENER_SCAN3.lsnr

1 ONLINE ONLINE data4tech02 STABLE

ora.OCR.dg(ora.asmgroup)

1 OFFLINE OFFLINE STABLE

2 ONLINE ONLINE data4tech02 STABLE

3 OFFLINE OFFLINE STABLE

ora.asm(ora.asmgroup)

1 ONLINE OFFLINE data4tech01 Instance Shutdown,STARTING

2 ONLINE ONLINE data4tech02 Started,STABLE

3 OFFLINE OFFLINE STABLE

ora.asmnet1.asmnetwork(ora.asmgroup)

1 ONLINE ONLINE data4tech01 STABLE

2 ONLINE ONLINE data4tech02 STABLE

3 OFFLINE OFFLINE STABLE

ora.cvu

1 ONLINE ONLINE data4tech02 STABLE

ora.data4tech01.vip

1 ONLINE ONLINE data4tech01 STABLE

ora.data4tech02.vip

1 ONLINE ONLINE data4tech02 STABLE

ora.qosmserver

1 ONLINE ONLINE data4tech02 STABLE

ora.scan1.vip

1 ONLINE ONLINE data4tech01 STABLE

ora.scan2.vip

1 ONLINE ONLINE data4tech02 STABLE

ora.scan3.vip

1 ONLINE ONLINE data4tech02 STABLE


4- Installation Phase 2- Installing Oracle Software


Unzip with the Oracle user.

$ unzip LINUX.X64_193000_db_home.zip -d /u01/app/oracle/product/19/db_1

Start the installation.

$ cd /u01/app/oracle/product/19/db_1
$ ./runInstaller

Click “Software only”.


ree

Click “Oracle Real Application Clusters database installation”.


ree

Be sure that both servers are selected and click “Next”.


ree

Click “Enterprise Edition”.


ree

Be sure that software location is the “/u01/app/oracle/product/19/db_1” index.


ree

Click “Next”.


ree

Write the root password to run the scripts automatically.


ree

Click “Ignore all” when NTP comes again.


ree

Click “Install”.


ree

Approve to run the scripts automatically.


ree

Finish the software installation by clicking “Close”.


ree

4- Installation Phase 3- Adding Disk Group with asmca


We’ll create the disk group where we’ll create the database with the asmca tool.

First, set .profile_crs with the Oracle user.

$ . .profile_crs
$ asmca

As you see, we have one disk group which we created during grid installation.


ree

Right click “Disk Groups” and click “Create”.


ree

I name the disk group as “DATA” where we’ll create the database. You can name it however you want. Add the disk you’ve configured with Oracleasm before. Click “OK”.


ree

We’ve created the disk group. You can view disk groups as in the picture. Click “Exit” and leave the asmca tool.


ree

5- Installation Phase IV- Creating Database with DBCA


Set .profile_db with the Oracle user.

$ . .profile_db
$ dbca

Click “Create a database”.

ree

Click “Advanced Configuration”.

ree

Click “General Purpose or Transaction Processing” and click “Next”.


ree

Be sure that servers are selected and click “Next”.


ree

You need to name the database and adjust sid value. We chose both as ‘orcl’. Don’t click “Create as Container database” and continue.


ree

Select “+DATA” which is a disk group we’ve added.


ree

Don’t enable “Archiving”. I’ll explain it later.


ree

Since we’ll not use “DB Vault” and “Label Security”, click “Next”.


ree

We’ll continue by using ASSM, if you wish you can use something else in accordance with your system. What’s important is that, the value shouldn’t exceed two third of the physical RAM value of the server.


ree

ree

Adjust the character set.


ree

Select “Dedicated server mode”.


ree

You may activate the “HR” schema if you wish. Click “Next”.


ree

Continue because we won’t use cloud control.


ree

Choose the passwords for “SYS” and “SYSTEM”.


ree

Select “Create Database”.


ree

Ignore” swap size and continue.


ree

Click “Finish” and start the installation.


ree

Click “Close” and finish the installation.


ree

ree

Here ends my writing “Installing Oracle 19C RAC Database”.


Hope to see you in new posts,

Take care.

 
 
 

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating

©2021, Data4Tech 

bottom of page