Article Number: 000110066
How to deploy Oracle 12c Release 2 standalone Database on Red Hat Enterprise Linux 7.x.
RAM | Swap Space |
Between 4GB and 16GB | Equal to the size of RAM |
More than 16GB
|
16GB |
Software Installation Location | Minimum Disk Space Requirements |
Grid Infrastructure home | At least 8 GB of disk space |
Grid Infrastructure home | At least 6.4 GB of disk space |
Shared storage disk space | Sizes of Database and Flashback Recovery Area |
Below is the recommended disk partitioning scheme entries when installing Red Hat Enterprise Linux 7 using a kickstart file on the local HDDs with at least 1.2 TB space available
part /boot --asprimary --fstype="xfs" --ondisk=sda --size=1024
2. Preparing Servers for Oracle Installation
Before installing Grid and database make sure to install below deployment scripts from Dell EMC which will set environment for Oracle database installation
2.1. Attaching systems to Red Hat Network (RHN)/Unbreakable Linux Network (ULN) Repository
Step 1: All the pre-requisites rpms need to installed before any GRID/DB installation is performed
Step 2:
Most of the pre-requisite RPMs for Oracle GRID/DB install are available as part of the base ISO. However, few RPMs like compat-libstdc++. is not available in the base (RH) ISO file and needs to be downloaded and installed manually prior to installing the preinstall RPMS provided by Dell for Red Hat
Setup a local yum repository to automatically install the rest of dependency RPMS for performing GRID/DB install
1. The recommended configuration is to serve the files over http using an Apache server (package name: httpd). This section discusses hosting the repository files from a local file system storage. While other options to host repository files exist, they are outside of the scope of this document. It is highly recommended to use local file system storage for speed and simplicity of maintenance.
[local]
name=Local Repository
baseurl=file:///media/myISO
gpgcheck=0
enabled=0
3.Now we will install the Apache service daemon with the following command which will also temporarily enable the local repository for dependency resolution:
yum -y install httpd --enablerepo=local
After the Apache service daemon is installed, start the service and set it to start up for us next time we reboot. Run the following commands as root:
systemctl start httpd
4. To use Apache to serve out the repository, copy the contents of the DVD into a published web directory. Run the following commands as root (make sure to switch myISO with the name of your ISO)command:
mkdir /var/www/html/myISO
cp -R /media/myISO/* /var/www/html/myISO
5. This step is only necessary if you are running SELinux on the server that hosts the repository. The following command should be run as root and will restore the appropriate SELinux context to the copied files:
restorecon -Rvv /var/www/html/
6. The final step is to gather the DNS name or IP of the server that is hosting the repository. The DNS name or IP of the hosting server will be used to configure your yum repository repo file on the client server. The following is the listing of an example configuration using the Red Hat Enterprise Linux 7.x Server media and is held in the configuration file:/etc/yum.repos.d/myRepo.repo
[myRepo]
name=Red Hat Enterprise Linux 7.x Base ISO DVD
baseurl= http://reposerver.mydomain.com/myISO
enabled=1
gpgcheck=0
7. Install the compat-libstdc++ rpm manually using rpm or yum command in the directory where the rpms are copied.
Ex: rpm -ivh
yum localinstall -y
Step 3:
1. Install the compat-libstdcc++ rpms by running the following command
yum install -y compat-libstdc++.i686
yum install -y compat-libstdc++.x86_64
2. Download the latest DellEMC Oracle Deployment tar file from DellEMC Dell Oracle Deployment RPMs for Oracle 12cR1 on RHEL7.x Deployment RPMs for RH to the servers where GRID/DB Installations will be performed.
Untar the DellEMC deployment tar-file , execute the following command:
tar -zxvf DellEMC-Oracle-Deployment-Red Hat Enterprise Linux7-12cR2-2018.06-1.tar.gz
After untarring we can find below rpms:
dell-redhat-rdbms-12cR2-preinstall-2018.06-1.el7.noarch.rpm
dell-redhat-rdbms-utilities-2018.06-1.el7.noarch.rpm
dell-redhat-rdbms-utilities-2018.06-1.el7.noarch.rpm is designed to do the following
3. Install these two rpms
yum localinstall -y dell-redhat-rdbms-12cR2-preinstall-2018.06-1.el7.noarch.rpm
yum localinstall -y dell-redhat-rdbms-utilities-2018.06-1.el7.noarch.rpm
2.2. Setting up the Network
2.2.1. Public Network
To configure the public network
1. Log in as root.
2. Navigate to /etc/sysconfig/network-scripts and edit the ifcfg-em# file
where # is the number of the network device
NAME="Oracle Public"
DEVICE= "em3"
ONBOOT=yes
TYPE= Ethernet
BOOTPROTO=static
IPADDR=
NETMASK=
GATEWAY=
3. Set the hostname via below command
hostnamectl set-hostname
where is the hostname that we are using for installation
4. Type service network restart to restart the network service
5. Type ifconfig to verify that the IP addresses are set correctly
6. To check your network configuration, ping the public IP address from a client on the LAN
3. Preparing Shared Storage for Oracle Standalone Installation
Oracle 12c Standalone Database installation requires LUNs for storing your Oracle Cluster Registry (OCR), Oracle Database files, and Flash Recovery Area (FRA). The following table shows the typical recommended storage volume design for Oracle 12c Database.
Database Volume Type/Purpose | No of Volumes | Volume Size |
OCR/VOTE | 3 | 50 GB each |
DATA | 4 | 250 GB1 each |
REDO2 | 2 | At least 50GB each |
FRA | 1 | 100 GB3 |
TEMP | 1 | 100GB |
1 - Adjust each volume size based on your database; 2 - At least two REDO ASM diskgroups are recommended, each with at least one storage volume; 3 - Ideally, the size should be 1.5x the size of the database if storage usable capacity permits;
3.1. Setting up Device Mapper Multipath for XtremIO storage
The purpose of Device Mapper Multipath is to enable multiple I/O paths to improve performance and provide consistent naming. Multipathing accomplishes this by combining your I/O paths into one device mapper path and properly load balancing the I/O. This section will provide the best practices on how to setup your device mapper multipathing within your Dell PowerEdge server.
Verify that your device-mapper and multipath driver are at least the version shown below or higher:
1. rpm -qa | grep device-mapper-multipath
device-mapper-multipath
2. Enable multipath by mpathconf -enable
3. Configure XtremIO multipath by modifying /etc/multipath.conf with the following
device {
vendor XtremIO
product XtremApp
path_grouping_policy multibus
path_checker tur
path_selector "queue-length 0"
rr_min_io_rq 1
user_friendly_names yes
fast_io_fail_tmo 15
failback immediate
}
4. Add appropriate user friendly names to each volume with the corresponding scsi_id. We can get scsi_ids with the below command
/usr/lib/udev/scsi_id -g -u -d /dev/sdX
5. Locate the multipath section within your /etc/multipath.conf file. In this section you will provide the scsi_id of each volume and provide an alias in order to keep a consistent naming convention across all of your nodes. An example is shown below
multipaths {
multipath {
wwid
alias alias_of_volume1
}
multipath {
wwid
alias alias_of_volume2
}
}
6. Restart your multipath daemon service using
Service multipathd restart
7. Verify that your multipath volumes alias are displayed properly
multipath -ll
3.2 Partitioning the Shared Disk
This section describes how to use parted utility to create a single partition on a volume/virtual disk that spans the entire disk.
$> parted -s /dev/mapper/ mklabel msdos
$> parted -s /dev/mapper/ primary 2048s 100%
$> parted -s /dev/sdX mklabel msdos
$> parted -s /dev/sdX primary 2048s 100%
Red Hat Enterprise Linux 7.x have the ability to use udev rules to ensure that the system properly manages permissions of device nodes. In this case, we are referring to properly setting permissions for our LUNs/volumes discovered by the OS. It is important to note that udev rules are executed in enumerated order. When creating udev rules for setting permissions, please include the prefix 60- and append .rules to the end of the filename.
3.3.1 When Red Hat Enterprise Linux is running as a bare-metal OS
#---------------------start udev rule contents ------------------------#
KERNEL=="dm-*", ENV =="C1_OCR1p?", OWNER:="grid", GROUP:="asmadmin", MODE="0660"
KERNEL=="dm-*", ENV =="C1_OCR2p?", OWNER:="grid", GROUP:="asmadmin", MODE="0660"
KERNEL=="dm-*", ENV =="C1_OCR3p?", OWNER:="grid", GROUP:="asmadmin", MODE="0660"
KERNEL=="dm-*", ENV =="C1_DATA1p?", OWNER:="grid", GROUP:="asmadmin", MODE="0660"
KERNEL=="dm-*", ENV =="C1_DATA2p?", OWNER:="grid", GROUP:="asmadmin", MODE="0660"
KERNEL=="dm-*", ENV =="C1_DATA3p?", OWNER:="grid", GROUP:="asmadmin", MODE="0660"
KERNEL=="dm-*", ENV =="C1_DATA4p?", OWNER:="grid", GROUP:="asmadmin", MODE="0660"
KERNEL=="dm-*", ENV =="C1_REDO1p?", OWNER:="grid", GROUP:="asmadmin", MODE="0660"
KERNEL=="dm-*", ENV =="C1_REDO2p?", OWNER:="grid", GROUP:="asmadmin", MODE="0660"
KERNEL=="dm-*", ENV =="C1_FRA?", OWNER:="grid", GROUP:="asmadmin", MODE="0660"
KERNEL=="dm-*", ENV =="C1_TEMP?", OWNER:="grid", GROUP:="asmadmin", MODE="0660"
#-------------------------- end udev rule contents ------------------#
3.3.2 When Red Hat Enterprise Linux is running as a guest OS
#---------------------start udev rule contents ------------------------#
KERNEL=="sd[a-z]*[1-9]", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="<scsi_id>", SYMLINK+="oracleasm/disks/ora-ocr1", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd[a-z]*[1-9]", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="<scsi_id>", SYMLINK+="oracleasm/disks/ora-ocr2", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd[a-z]*[1-9]", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="<scsi_id>", SYMLINK+="oracleasm/disks/ora-ocr3", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd[a-z]*[1-9]", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="<scsi_id>", SYMLINK+="oracleasm/disks/ora-fra", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd[a-z]*[1-9]", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="<scsi_id>", SYMLINK+="oracleasm/disks/ora-temp, OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd[a-z]*[1-9]", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="<scsi_id>", SYMLINK+="oracleasm/disks/ora-data1", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd[a-z]*[1-9]", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="<scsi_id>", SYMLINK+="oracleasm/disks/ora-data2", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd[a-z]*[1-9]", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="<scsi_id>", SYMLINK+="oracleasm/disks/ora-data3", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd[a-z]*[1-9]", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="<scsi_id>", SYMLINK+="oracleasm/disks/ora-data4", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd[a-z]*[1-9]", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="<scsi_id>", SYMLINK+="oracleasm/disks/ora-redo1", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd[a-z]*[1-9]", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="<scsi_id>", SYMLINK+="oracleasm/disks/ora-redo2", OWNER="grid", GROUP="asmadmin", MODE="0660"
#-------------------------- end udev rule contents ------------------#
This section gives you the installation information of Oracle 12c grid infrastructure for a standalone database
SQL> ALTER DISKGROUP REDO ALTER TEMPLATE onlinelog ATTRIBUTES (fine)
SQL> ALTER DISKGROUP TEMP ALTER TEMPLATE tempfile ATTRIBUTES (fine)
SQL> ALTER DISKGROUP FRA ALTER TEMPLATE onlinelog ATTRIBUTES (fine)
Creating Database using DBCA
Redo Log Group Number | Thread Number | Disk Group Location | Redo Log File Size |
1 | 1 | +REDO1 | 5 GB |
2 | 1 | +REDO2 | 5 GB |
3 | 1 | +REDO1 | 5 GB |
4 | 1 | +REDO2 | 5 GB |
Red Hat Enterprise Linux Version 7
12 Dec 2023
5
How To