Oracle RAC Step by Step Installation on Linux -1

Hi,

I will explain the installation of Oracle RAC ( Real Application Cluster ) on Linux which is High availability solution of Oracle in this tutorial series.

 

If you don’t know what is the Oracle RAC and RAC Architecture, read following article to understand what is the Oracle RAC.

 

What is the Oracle RAC and Architecture of Real Application Cluster

 

If you have read above article, then we can start installation of Oracle RAC.

 

 

 

To install 2 node RAC Database on linux Servers informations are like following.

 

192.168.63.10    rac01

192.168.63.11   rac02

 

The list of VIP, Interconnect IP and SCAN IPs for RAC Installation are as follows.

8.3.1.11rac01-pivPrivate IP ( Interconnect )
8.3.1.12rac02-pivPrivate IP ( Interconnect )
192.168.63.12rac01-vipVirtual IP
192.168.63.13rac02-vipVirtual IP
192.168.63.14rac-scan.deveci.localSCAN IP
192.168.63.15rac-scan.deveci.localSCAN IP
192.168.63.16rac-scan.deveci.localSCAN IP

 

If you don’t know Oracle linux installation, you can read following article.

Oracle Linux 7.6 Step by Step Installation on VirtualBox -2

 

The following operations are performed on the Linux server to install Oracle RAC.

 

 

 

 

If you will install Oracle RAC 12c 12.2 then install following preinstall package.

[root@rac01 ~]#  yum install oracle-database-server-12cR2-preinstall.x86_64

 

 

If you will install Oracle RAC 12c 12.1 then install following preinstall package.

[root@rac01 ~]# yum install oracle-rdbms-server-12cR1-preinstall.x86_64

 

 

 

 

If you will install Oracle RAC 11g 11.2.0.4 then install following preinstall package.

[root@rac01 ~]#  yum install oracle-rdbms-server-11gR2-preinstall

 

Or you can install following yum packages instead of preinstall package.

[root@rac01 ~]#  yum install oracle-rdbms-server-11gR2-preinstall
yum install binutils-2*x86_64*
yum install glibc-2*x86_64* nss-softokn-freebl-3*x86_64*
yum install glibc-2*i686* nss-softokn-freebl-3*i686*
yum install compat-libstdc++-33*x86_64*
yum install glibc-common-2*x86_64*
yum install glibc-devel-2*x86_64*
yum install glibc-devel-2*i686*
yum install glibc-headers-2*x86_64*
yum install elfutils-libelf-0*x86_64*
yum install elfutils-libelf-devel-0*x86_64*
yum install gcc-4*x86_64*
yum install gcc-c++-4*x86_64*
yum install ksh-*x86_64*
yum install numactl-devel-2*x86_64* 
yum install sysstat-9*x86_64* 
yum install compat-libstdc++-33*i686* 
yum install compat-libcap*
yum install libaio-0*x86_64*
yum install libaio-devel-0*x86_64*
yum install libaio-0*i686*
yum install libaio-devel-0*i686*
yum install libgcc-4*x86_64*
yum install libgcc-4*i686*
yum install libstdc++-4*x86_64*
yum install libstdc++-4*i686*
yum install libstdc++-devel-4*x86_64*
yum install make-3.81*x86_64*   

2-Kernel parameters are set as follows.

/etc/sysctl.conf

# Oracle Database Kernel Parameters
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500

 

3- The NTP service is configured and restarted as follows. Thus, date and time of 2 nodes is set by NTP and they are synchronized by NTP Server.

[root@rac01 ~]# vi /etc/sysconfig/ntpd

OPTIONS="-x -u ntp:ntp -p /var/run/ntpd.pid"


[root@rac01 ~]# service ntpd restart
[root@rac01 ~]# chkconfig ntpd on   

4- Firewall must be disabled and turned off .

[root@rac01 ~]#  vi /etc/selinux/config

SELINUX=disabled



[root@rac01 ~]#  service iptables stop
[root@rac01 ~]#  chkconfig iptables off

 

5- Set the Oracle user’s limits as follows.

 

[root@rac01 ~]# vi /etc/security/limits.conf

# Oracle Database Limit Parameters
oracle   soft   nofile    1024
oracle   hard   nofile    65536
oracle   soft   nproc    2047
oracle   hard   nproc    16384
oracle   soft   stack    10240
oracle   hard   stack    32768   

6- Create Oracle user , change password and their groups as follows.

# groupadd -g 501 oinstall
# groupadd -g 502 dba
# groupadd -g 503 oper
# groupadd -g 504 asmadmin
# groupadd -g 506 asmdba
# groupadd -g 505 asmoper

# useradd -u 502 -g oinstall -G dba,asmdba,oper oracle
# passwd oracle
  

7- Shared disks are prepared for RAC and formatted with oracleasm tool like following steps.

[root@rac01 ~]# yum install oracleasm
[root@rac01 ~]# yum install oracleasm-lib
[root@rac01 ~]# yum install oracleasm-support
[root@rac01 ~]# /etc/init.d/oracleasm configure
[root@rac01 ~]# ls /dev/sd*
/dev/sda  /dev/sda1  /dev/sda2  /dev/sdb
[root@rac01 ~]# 
[root@rac01 ~]# 

[root@rac01 ~]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x786292ec.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1305, default 1): 
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-1305, default 1305): 
Using default value 1305

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@rac01 ~]# 

[root@rac01 ~]# 
[root@rac01 ~]# ls /dev/sd*
/dev/sda  /dev/sda1  /dev/sda2  /dev/sdb  /dev/sdb1
[root@rac01 ~]# 
[root@rac01 ~]# oracleasm createdisk ASMDISK /dev/sdb1
Writing disk header: done
Instantiating disk: done
[root@rac01 ~]# 

[root@rac01 ~]# oracleasm listdisks
ASMDISK
[root@rac01 ~]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
[root@rac01 ~]#    [root@rac02 ~]# ls /dev/sd*
/dev/sda  /dev/sda1  /dev/sda2  /dev/sdb
[root@rac02 ~]# fdisk /dev/sdb

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
Partition 1 is already defined.  Delete it before re-adding it.

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@rac02 ~]# 
[root@rac02 ~]# 
[root@rac02 ~]# ls /dev/sd*
/dev/sda  /dev/sda1  /dev/sda2  /dev/sdb  /dev/sdb1
[root@rac02 ~]# 
[root@rac02 ~]# 
[root@rac02 ~]# oracleasm createdisk ASMDISK /dev/sdb1
Device "/dev/sdb1" is already labeled for ASM disk "ASMDISK"
[root@rac02 ~]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
Instantiating disk "ASMDISK"
[root@rac02 ~]# oracleasm listdisks
ASMDISK
[root@rac02 ~]#

 

 

Preliminary preparations and requirements are required for Linux servers in this post.

 

I will explain Preliminary preparations and requirements for Unix (IBM AIX ) in the next post.

 

 

Do you want to learn Oracle Database for Beginners, then read the following articles.

https://ittutorial.org/oracle-database-19c-tutorials-for-beginners/

About Mehmet Salih Deveci

I am Founder of SysDBASoft IT and IT Tutorial and Certified Expert about Oracle & SQL Server database, Goldengate, Exadata Machine, Oracle Database Appliance administrator with 10+years experience.I have OCA, OCP, OCE RAC Expert Certificates I have worked 100+ Banking, Insurance, Finance, Telco and etc. clients as a Consultant, Insource or Outsource.I have done 200+ Operations in this clients such as Exadata Installation & PoC & Migration & Upgrade, Oracle & SQL Server Database Upgrade, Oracle RAC Installation, SQL Server AlwaysOn Installation, Database Migration, Disaster Recovery, Backup Restore, Performance Tuning, Periodic Healthchecks.I have done 2000+ Table replication with Goldengate or SQL Server Replication tool for DWH Databases in many clients.If you need Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS Consultancy and Training you can send my email adress [email protected].-                                                                                                                                                                                                                                                 -Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS ve linux Danışmanlık ve Eğitim için  [email protected] a mail atabilirsiniz.

5 comments

  1. If i use Normal disk during ASM installation then what will be the exact size for MGMT group?

  2. I genuinely enjoy looking at on this website , it has great posts.

Leave a Reply

Your email address will not be published. Required fields are marked *