Oracle Data Guard 19c Deployment Series from Zero to Fast Failover part2 preinstallation

 

In the previous part, we installed two virtual machines.

Part 1: Virtual Machine Preparation

Now both systems are up, the firewall has been disabled, and the hostnames have been configured.


Attaching the Oracle Linux ISO and Creating a Local Repository

Using VirtualBox, we attach the Oracle Linux 9.6 disk to both machines again in order to create a local repository.

To do this, right-click on the virtual machine, select Settings, and go to the Storage section.
Then click on the CD-ROM icon on the left side, and from the right side set the Optical Drive to the desired ISO file, as shown in the image below.


Now, using MobaXterm, connect to both machines via SSH.


Mounting the ISO

First, we need to mount the ISO:

mkdir /cdrom
mount /dev/cdrom /cdrom
If the mount is successful, you will see output similar to the following:
 
mount: /cdrom: WARNING: source write-protected, mounted read-only.
 

Creating a Local Repository from the DVD

To avoid dependency on the internet, we create a local repository from the DVD.

First, navigate to the repository directory and back up the existing files:

cd /etc/yum.repos.d
mkdir backup
mv ./* backup/

If you see an error similar to the following, it is normal because the backup directory itself is being moved:
mv: cannot move './backup' to a subdirectory of itself, 'backup/backup'

Creating a New Repository File

Create a new repository file:

vi /etc/yum.repos.d/media.repo

Add the following content to the file:

[dvd-BaseOS]
name=DVD for RHEL - BaseOS
baseurl=file:///cdrom/BaseOS
enabled=1
gpgcheck=0

[dvd-AppStream]
name=DVD for RHEL - AppStream
baseurl=file:///cdrom/AppStream
enabled=1
gpgcheck=0

Verifying That DVD Repositories Are Enabled

cd /etc/yum.repos.d
chmod 644 media.repo
dnf clean all
dnf repolist enabled

Expected output:

dvd-BaseOS
dvd-AppStream


Installing the Preinstall RPM

Using the SFTP feature in MobaXterm, transfer the following RPM file to both machines:

 
oracle-database-preinstall-19c-1.0-1.el9.x86_64.rpm


Navigate to the directory where the file was uploaded.
Usually, this is the /root directory.

Run the following command:

dnf install -y oracle-database-preinstall-19c-1.0-1.el9.x86_64.rpm

Creating Additional OS Groups

We need to create three additional groups:

groupadd -g 54327 asmdba
groupadd -g 54328 asmoper
groupadd -g 54329 asmadmin

These groups are specifically for the user responsible for managing the infrastructure, also known as Grid Infrastructure.

I perform both Grid Infrastructure and Database installations using a single user, which is the oracle user.
The main reason is that I am responsible for managing both the infrastructure and the primary database.

We modify the oracle user so that it becomes a member of these groups as well:

usermod -u 54321 -g oinstall -G dba,oper,backupdba,dgdba,kmdba,asmdba,asmoper,asmadmin,racdba oracle

If you are interested in OS group separation, you can read the following article, which focuses on the backupdba group:

https://vahiddb.com/en/oracle/database-administration/using-operating-system-groups-for-segregating-database-permissions-in-oracle-database-en

Setting the Oracle User Password

Set a password for the oracle user using the following command:

passwd oracle

Grant ownership of the /u01 directory to the oracle user:

chown oracle:oinstall /u01/ -R

UDEV Configuration

The final step before starting the installation is udev configuration.

You can find the complete udev tutorial at the following link:

https://vahiddb.com/en/os/os-infra/using-udev-for-asm-en

After completing these steps, make sure to run the eject command so that the ISO is removed and the system does not boot from it.

Optionally, for additional safety, you can reboot both machines before proceeding.


Video Link

YouTube video link for this part in persian


Next Part

Grid Infrastructure Installation