Skip to main content

Step by Step Oracle RAC 12c Release 2 (12c R2) installation on Oracle VirtualBox with OEL7


<<Back to Oracle RAC Main Page

Step by Step How to Install Oracle RAC (Real Application Cluster) on your Laptop

Note:- Installation of Oracle RAC is a very lengthy and time taking process and requires lots of preparation and co-ordination with different Teams in real environment. Since in this post you will perform all the tasks your own, it may take even more time. Keeping this point in mind and make the installation easier I have divided this post in several small posts which may be independently completed. lastly you have to be patient.
Step1: Planning and Understanding Hardware and Software Requirements for Oracle RAC installation on your Laptop.
Check out the post  Minimum Hardware and Software Requirements to Install Oracle Real Application Cluster (Oracle RAC 12c) to complete this step
Step2: Download the Required Software
Check out the post How to Download Oracle Software from Oracle E- delivery and download the required software.
Step3: Create the Virtual Machines
Create the Virtual Servers with the configuration mentioned in step1. You can follow the instructions from post Step by Step how to Create Virtual Machine using Virtualbox
Step4: Install OS Oracle Enterprise Linux (OEL 7)
Follow the post Installing Oracle Enterprise Linux 7 for Oracle RAC Installation
and complete the OS installation. Perform the installation on all 3 Servers. 2 for RAC nodes and 1 for DNS and NTP
Step5: Install Open Filer  for Shared Storage Preparation
Follow the instructions from How to Install OpenFiler Storage Management Appliance
Step6: Configure Openfiler and Discover the LUN on RAC nodes
Follow the instructions from Step by Step How to Configure Shared Storage for Oracle RAC Using Openfiler
Step7: Configure NTP.
Follow the instructions from How to Configure NTP Server for Oracle RAC Installation
NOTE: If you don't want to use NTP just de-configure it and let the Oracle Clusterware (CTSS) take care of time synchronization
Step8: Deconfigure NTP on Oracle RAC database Nodes
Step8 is only required if you don't have an NTP server to synchronize the time of the servers. De-configure it for all the RAC nodes in the cluster.
#systemctl stop ntpd.service
#systemctl status ntpd.service
#mv /etc/ntp.conf /etc/ntp.conf.org
# rm /var/run/ntpd.pid
Step9: Configure DNS
Follow the instruction from How to Configure DNS Server for Oracle RAC Installation

Step10: Prepare OS for Oracle RAC Installation
complete the Step10 (from A-F) as root for all the nodes
A: Add group and user
Add oinstall and dba group
#groupadd -g 500 oinstall
#groupadd -g 501 dba
Add oracle user
#useradd -u 500 -g oinstall -G dba oracle
Reset the password for user oracle
#passwd oracle
B : Create the directories and change ownership to Oracle
#mkdir -p  /u01/app/12.2.0.1/grid
#mkdir -p /u01/app/oracle/product/12.2.0.1/dbp1
#chown -R oracle:oinstall /u01
#chmod -R 775 /u01/
C:  Configure /etc/hosts.
Enter All the IPs (Public IPs, Private IPs, VIPs etc) in /etc/hosts as shown below. Each node must have all the IPs from all the nodes participating in the cluster including VIP and Private IPs.
#loopback address

127.0.0.1       localhost.localdomain   localhost

# Public IP Address
192.9.1.100   node1.oracle.com        node1
192.9.1.101   node2.oracle.com        node2
192.9.1.105   storage.oracle.com      storage
# Private IP Address
10.0.0.1   node1-priv.oracle.com   node1-priv
10.0.0.2   node2-priv.oracle.com   node2-priv
# Virtual IP Address
192.9.1.150   node1-vip.oracle.com        node1-vip
192.9.1.151   node2-vip.oracle.com        node2-vip

D: Disable SELINUX

If already not disabled this is the time you must disable SELINUX setting
Change the setting by editing the "/etc/selinux/config" file, making sure the SELINUX flag is set as follows
SELINUX=disable
E: Disable IPtables/firewall
If you have the Linux firewall enabled, you will need to disable or configure it, as shown here. The following is an example of disabling the firewall.
#systemctl stop  iptables.service
#chkconfig iptables off
F:  Enable NTP Slewing Option
The Option is only needed if you are using NTP for time synchronization. If your RAC is going to be permanently connected to your main network and you want to use NTP, you must add the "-x" option into the following line in the "/etc/sysconfig/ntpd" file.
OPTIONS="-x -u ntp:ntp -p /var/run/ntpd.pid"
Step11: Prepare ASM Disks for Shared Storage
You have installed and configured openfiler in Step 5 and Step6. The shared LUN  (/dev/sdb) from openfiler is discovered on your RAC node.
Create minimum 8 Partitions each 40GB in size as shown below. Use fdisk to create partitions
Note: You can do this as root user and you must do it only on one node.


Step12: Discover the Above Created partitions on Node2
Just execute the following command as root to sync the partition table on node2 as well
#partprobe
run fdisk –l  to see if the partitions are visible
Step13: Create ASM disk using ASM Lib
Follow the instruction at Step by Step How to Install and Configure Oracle asmlib Install and configure the ASMLIB and create the disk on one node and just discover it on 2nd node using oracleasm scandisks command.
Step14: Configure user equivalence for oracle user
On node1 & node2 as oracle user
$ssh-keygen –t rsa
$ssh-keygen –t dsa
On node1
$cd /home/oracle/.ssh
$cat *.pub>>node1
On node2
$cd /home/oracle/.ssh
$cat *.pub>>node2
On node1
$scp node1 node2:/home/oracle/.ssh
On node2
$scp node2 node1:/home/oracle/.ssh
On node1
$cat node*>>authorized_keys
On node2
$cat node*>>authorized_keys
Now test the ssh configuration, should work without Password
On node1
$ssh node1
$ssh node2
On Node2
$ssh node2
$ssh node1
Step15: Install Mandatory Packages for Oracle
Install following required RPMs (same or above version) on both the nodes (node1, node2). Use rpm or yum to install.
binutils-2.23.52.0.1
compat-libcap1-1.10
libgcc-4.8.2
libstdc++-4.8.2
libstdc++-devel-4.8.2
sysstat-10.1.5
ksh
make-3.82
glibc-2.17
glibc-devel-2.17
libaio-0.3.109
libaio-devel-0.3.109
nfs-utils-1.2.3-15
smartmontools-6.2-4
net-tools-2.0-0.17
cvuqdisk-1.0.10-1
cvuqdisk-1.0.10-1.rpm is located under /u01/stage/database/rpm/ (location where you have extracted your grid binaries)
Step16: Configure Kernal Parameters
Configure Following Kernal  parameter on both nodes (Node1 and Node2)
Set Kernel Parameters in /etc/sysctl.conf file

fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
kernel.panic_on_oops = 1
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.conf.all.rp_filter = 2
net.ipv4.conf.default.rp_filter = 2
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500

# sysctl –p
Configure /etc/security/limits.conf file
oracle   soft   nofile    1024
oracle   hard   nofile    65536
oracle   soft   nproc    16384
oracle   hard   nproc    16384
oracle   soft   stack    10240
oracle   hard   stack    32768
oracle   hard   memlock    134217728
oracle   soft   memlock    134217728

Configure /etc/pam.d/login file
session   required     /lib/security/pam_limits.so

Step17: Copy and unzip oracle database Software
Transfer the oracle Grid Infrastructure software and unzip it in the $GRID_HOME
Since I want to install grid software under /u01/app/12.2.0.1/grid. I must unzip grid software at this location.
Step18: Perform RAC Installation PreCheck using Cluster Verification Utility from GI Home
As oracle user run cluster verification utility to perform the installation prerequisites
$cd under /u01/app/12.2.0.1/grid
./runcluvfy.sh stage -pre crsinst -n node1,node2 -fixup -verbose
Fix any error /warning reported by runcluvfy. It is highly advisable, not to ignore a single warning if you don't know the consequence
To fix Most common Issues reported during precheck Click Here
Step18: Initiate the Oracle Grid Infrastructure Installation
 If pre-installation check of cluster verification utility returns success go ahead for oracle clusterware (RAC) installation
Login as Oracle user and execute gridSetup.sh from /u01/app/12.2.0.1/grid
./gridSetup.sh
Step19:
Follow the installer instruction as Shown below.
Choose Configure Oracle Grid Infrastructure for a New Cluster and click next
select configure an Oracle standalone Cluster and click next
 Enter Cluster Name, Scan Name and Port and click Next
Click on Add button and add the 2nd Server
Click on SSH Connectivity
 if you have already configured ssh you can test ssh configuration by clicking test button
to Setup the ssh you can click on Setup button
Click Next to proceed
Check if the proper Interface is selected. You  can Change the Default listing from drop down list.
Click Next
Click Next
Click Next
Enter the disk Group Name.
if your disk is not listed here
Check if the disk discovery path is correct.Change if required
Check if the permission of the disk is correct
Select appropriate disks and click Next
Enter the diskgroup Name to house the GMIR and click Next
Specify the Password and and Click Next
Click Next
Click Next.
Choose the Groups accordingly and click Next
Click Yes to ignore the warning and click Next to continue
Enter Oracle base Directory and click Next

Click Next
Click Next
Click Install to start the Installation

Execute the scripts. Ensure to execute serially exactly in the order listed below
On Node1
/u01/app/oraInventory/orainstRoot.sh
On Node2
/u01/app/oraInventory/orainstRoot.sh
On Node1
/u01/app/12.2.0.1/grid/root.sh
wait to finish the root.sh on node1.
On Node2:
/u01/app/12.2.0.1/grid/root.sh
Click ok only once the script execution on both the nodes are completed successfully
Note: Do not start the execution of script on node2 until it finish on node1
After successful installation of oracle clusterware you can verify the status as follows


Comments

  1. Step By Step Oracle Rac 12C Release 2 (12C R2) Installation On Oracle Virtualbox With Oel7 >>>>> Download Now

    >>>>> Download Full

    Step By Step Oracle Rac 12C Release 2 (12C R2) Installation On Oracle Virtualbox With Oel7 >>>>> Download LINK

    >>>>> Download Now

    Step By Step Oracle Rac 12C Release 2 (12C R2) Installation On Oracle Virtualbox With Oel7 >>>>> Download Full

    >>>>> Download LINK ev

    ReplyDelete

Post a Comment

Popular posts from this blog

DataPump Import Of Object Types Fails With Errors ORA-39083 ORA-2304 Or ORA-39117 ORA-39779

<<Back to Oracle DATAPUMP Main Page ORA-39083: Object type TYPE:"TEST_QA01"."LOG_RECORD" failed to create with error: ORA-02304: invalid object identifier literal Import: Release 12.1.0.2.0 - Production on Tue May 29 07:59:12 2018 Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, Oracle Label Security, OLAP, Advanced Analytics and Real Application Testing options Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded Starting "SYSTEM"."SYS_IMPORT_FULL_01":  system/********@TEST_QA parfile=import_TEST.par Processing object type SCHEMA_EXPORT/USER Processing object type SCHEMA_EXPORT/SYSTEM_GRANT Processing object type SCHEMA_EXPORT/ROLE_GRANT Processing object type SCHEMA_EXPORT/DEFAULT_ROLE Pr

ORA-28374: typed master key not found in wallet

<<Back to Oracle DB Security Main Page ORA-46665: master keys not activated for all PDBs during REKEY SQL> ADMINISTER KEY MANAGEMENT SET KEY FORCE KEYSTORE IDENTIFIED BY xxxx WITH BACKUP CONTAINER = ALL ; ADMINISTER KEY MANAGEMENT SET KEY FORCE KEYSTORE IDENTIFIED BY xxxx WITH BACKUP CONTAINER = ALL * ERROR at line 1: ORA-46665: master keys not activated for all PDBs during REKEY I found following in the trace file REKEY: Create Key in PDB 3 resulted in error 46658 *** 2019-02-06T15:27:04.667485+01:00 (CDB$ROOT(1)) REKEY: Activation of Key AdnU5OzNP08Qv1mIyXhP/64AAAAAAAAAAAAAAAAAAAAAAAAAAAAA in PDB 3 resulted in error 28374 REKEY: Keystore needs to be restored from the REKEY backup.Aborting REKEY! Cause: All this hassle started because I accidently deleted the wallet and all wallet backup files too and also forgot the keystore password. There was no way to restore the wallet back. Fortunately in my case the PDB which had encrypted data was supposed to be deco

How to Find VIP of an Oracle RAC Cluster

<<Back to Oracle RAC Main Page How to Find Out VIP of an Oracle RAC Cluster Login clusterware owner (oracle) and execute the below command to find out the VIP hostname used in Oracle RAC $ olsnodes -i node1     node1-vip node2     node2-vip OR $ srvctl config nodeapps -viponly Network 1 exists Subnet IPv4: 10.0.0.0/255.255.0.0/bondeth0, static Subnet IPv6: Ping Targets: Network is enabled Network is individually enabled on nodes: Network is individually disabled on nodes: VIP exists: network number 1, hosting node node1 VIP Name: node1-vip VIP IPv4 Address: 10.0.0.1 VIP IPv6 Address: VIP is enabled. VIP is individually enabled on nodes: VIP is individually disabled on nodes: VIP exists: network number 1, hosting node node2 VIP Name: node2-vip VIP IPv4 Address: 10.0.0.2 VIP IPv6 Address: VIP is enabled. VIP is individually enabled on nodes: VIP is individually disabled on nodes:

How to Power On/off Oracle Exadata Machine

<<Back to Exadata Main Page How to Power On/off Oracle Exadata Machine Oracle Exadata machines can be powered on/off either by pressing the power button on front of the server or by logging in to the ILOM interface. Powering on servers using  button on front of the server The power on sequence is as follows. 1. Start Rack, including switches  Note:- Ensure the switches have had power applied for a few minutes to complete power on  configuration before starting Exadata Storage Servers 2.Start Exadata Storage Servers  Note:- Ensure all Exadata Storage Servers complete the boot process before starting the   database servers 3. Start Database Servers Powering On Servers Remotely using ILOM The ILOM can be accessed using the Web console, the command-line interface (CLI), IPMI, or SNMP. For example, to apply power to server dm01cel01 using IPMI, where dm01cel01-ilom is the host name of the ILOM for the server to be powered on, run the

How to Create Pfile from Spfile and Vice Versa

<<Back to DB Administration Main Page There are instances when a DBA need to start the database using pfile, for example to trouble an instance startup error or to validate init file post parameter changes etc. In such situations you can create a pfile from spfile and once you are done with your changes you can create spfile from updated/modified pfile to start the database. How to Create Pfile from Spfile As sysdba execute following command  SQL> create pfile='/tmp/initOrcl.ora' from spfile; How to Create SPfile from Pfile As sysdba execute following command  SQL> create spfile from  pfile='/tmp/initOrcl.ora'; You can also create the pfile directly from memory How to Create Pfile from Memory As sysdba execute following command  SQL> create  pfile='/tmp/initOrcl.ora' from memory;

How to Attach to a Datapump Job and Check Status of Export or Import

<<Back to Oracle DATAPUMP Main Page How to check the progress of  export or import Jobs You can attach to the export/import  job using ATTACH parameter of oracle datapump utility. Once you are attached to the job you check its status by typing STATUS command. Let us see how Step1>  Find the Export/Import Job Name You can find the datapump job information from  DBA_DATAPUMP_JOBS or  USER_DATAPUMP_JOBS view. SQL> SELECT OWNER_NAME,JOB_NAME,OPERATION,JOB_MODE,STATE from DBA_DATAPUMP_JOBS; OWNER_NAME JOB_NAME                       OPERATION            JOB_MODE   STATE ---------- ------------------------------ -------------------- ---------- ---------- SYSTEM     SYS_EXPORT_FULL_02             EXPORT               FULL       EXECUTING OR You can also find the job name for export/import in logfile in beginning itself. Step2>Attach to the Job and check status One you get the Export/Import Job Name attach the job and check its status. You can attach or det

How to export only data or only metadata using expdp

<<Back to Oracle DATAPUMP Main Page CONTENT parameter of expdp let you select whether you want to export only data or only metadata or both Default : ALL Syntax and Description CONTENT=[ALL | DATA_ONLY | METADATA_ONLY] DATA_ONLY exports only table row data; no database object definitions are exported. METADATA_ONLY exports only database object definitions; no table row data is exported. Exporting metadata only  $ cat exp_full_pdb01.par directory=dump dumpfile=EXP_PDB01_FULL%U.dmp logfile=EXP_PDB01_FULL.log full=y CONTENT=METADATA_ONLY $ expdp system@PDB01 parfile=exp_full_pdb01.par Exporting data only directory=dump dumpfile=EXP_PDB01_FULL%U.dmp logfile=EXP_PDB01_FULL.log full=y CONTENT=DATA_ONLY $ expdp system@PDB01 parfile=exp_full_pdb01.par

ORA-15040: diskgroup is incomplete

<<Back to Oracle ASM Main Page ORA-15040: diskgroup is incomplete SQL> startup ORA-00099: warning: no parameter file specified for ASM instance ASM instance started Total System Global Area 1140850688 bytes Fixed Size                  8629704 bytes Variable Size            1107055160 bytes ASM Cache                  25165824 bytes ORA-15110: no diskgroups mounted Reason: The reason of this error is simply the ASM is not able to find the some or all the disks. Solution: Investigate and make all the disks available to ASM to mount the disk group. Make sure the disks has proper permissions. If you are using AFD check following services are online oracleacfs oracleadvm oracleoks  oracleafd   Source of Problem : Issue started after restart of the server After restarting the server when I tried to start the ASM instance its started throwing error.  ORA-15110: no diskgroups mounted Investigation in my Case Step1> ASM Logfile Scanning  Looked i

Step by Step How to Configure Software Keystore/ Oracle Wallet

<<Back to Oracle DB Security Main Page How to Configure a Software Keystore A software keystore is a container that stores the Transparent Data Encryption master encryption key. To configure a software Keystore follow the steps below. Step 1: Set the Keystore Location in the sqlnet.ora File You can store the software keystore (also known as wallet) in file system or in ASM Diskgroup. Does not matter where you want to store the keystore you have modify the sqlnet.ora and make an entry accordingly Make an entry as shown below in $ORACLE_HOME/network/admin/sqlnet.ora file Example1: If Storing the Wallet in ASM ENCRYPTION_WALLET_LOCATION=  (SOURCE=(METHOD=FILE)    (METHOD_DATA=     (DIRECTORY= +DG_TST_DATA/$ORACLE_SID/wallet )    )  )   Example2: If Storing the Wallet in File System ENCRYPTION_WALLET_LOCATION=  (SOURCE=(METHOD=FILE)    (METHOD_DATA=     (DIRECTORY= /u01/dbatst1/admin/wallet/$ORACLE_SID)    )  ) NOTE: Ensure that the path you entered in  DIREC

ORA-28365: wallet is not open while starting the database

<<Back to DB Administration Main Page ORA-28365: wallet is not open Encountered while Starting the Database $ srvctl start instance -d CDB001 -i CDB0011 PRCR-1013 : Failed to start resource ora.cdb001.db PRCR-1064 : Failed to start resource ora.cdb001.db on node node1.oracle.com CRS-5017: The resource action "ora.cdb001.db start" encountered the following error: ORA-28365: wallet is not open . For details refer to "(:CLSN00107:)" in "/u01/app/oracle/diag/crs/node1.oracle.com/crs/trace/crsd_oraagent_oracle.trc". CRS-2674: Start of 'ora.cdb001.db' on 'node1.oracle.com' failed Solution : Start the instance in mount mode SQL> startup mount; ORACLE instance started. Total System Global Area 2147483648 bytes Fixed Size                  2926472 bytes Variable Size            1392511096 bytes Database Buffers          738197504 bytes Redo Buffers               13848576 bytes Database mounted. Check Wallet status set linesiz