09 October, 2016

Step by Step Install of Oracle RAC 11gR2 on OEL 6.5 on Oracle VM Virtual BOX

Here I am listing out the steps to install 11gR2 RAC on OS OEL6.5 on Oracle VM Virtual BOX.
Step1:
Create new Virtual BOX VM. Click on new and provide Name as rac1 type as Linux and version as Oracle 64bit. Click Next
01
Step2: Set Base Memory to 3072 MB, then click the “Next” button
02
Step3:Accept the default option to create a new virtual hard disk by clicking the “Create” button
03
Step:4  Select the default VMDK type and click the “Next” button on the Create Virtual Hard Drive screen
04
Step5:  Select Dynamically Allocated and select option “split into files of less than 2gb” Click next
05
Step6: Provide the location where you want to save the VM files. In my case I have provided path as below. Also increase the size of your vm from default to say 50GB and  Click “Create”
06
Once we click on Create we get rac1 vm created as highlighted below:
07
Step7:Click on General->Advanced and change shared clipboard to Bidirectional and Change Drag ‘n’ Drop to Bidirectional and click Ok
08
Step8: Click on Network
09
Add three Adaptors.
Make sure “Adapter 1” is enabled, attached to “Internal Network” or “Host-only Adapter”. This interface will be used for public network, for example, for connection to the RAC datbase from other applications. More about networking will be explained later. On the screenshot below “Internal Network” is selected and name “pubnet” was given to this network
10
Then click on the “Adapter 2” tab. Make sure “Adapter 2” is enabled and attach to “Internal Network”. Name this network “privnet”:
11
Then finally click on the “Adapter 3”, enable it, and attach to “Bridged Adapter” or “NAT”. This adapter will be used for internet. Then press “OK” button
12
Step:9 Click on storage to load OEL6.5 iso
13
Step10: Select OEl6.5 ISO and click ok
14
Step11 Click on Shared Folder this will be helpful to get any windows folder mounted on OEL6.5.
15
16
17
18
Now we can see shared folders with 1 value. It Means we are sharing a folder/drive from Host machine to Guest.
Step12: Click on Start as shown below
19
Step13. After starting we get below screen and select Install or Upgrade an Existing System.
20
Step14: Select skip
21
Step15:Scroll Down and click NEXT
22
Step16: Click Next
23
Step17:Click Next
24
Step18: Select basic Storage and click Next
25
Step19: Select Discard any Data
26
Step20: Change the hostname as below(not mandatory that it should be same as below
27
Scroll down and click on “Configure Network”
28
Step 20: Select System eth0 and click on edit
29
Step21: Select Connect Automatically and select IPV4 Setting
30
Step22: Make sure that “Connect automatically” is checked. Select “IPv4 Settings” tab; change Method to “Manual”; Press “Add” and fill Address: 192.168.56.71; Netmask: 255.255.255.0; Gateway: 0.0.0.0. Press “Apply” then done:
31
Step23: Now select System eth1 and click  on edit
32
Step24: In the Network Connections screen select “System eth1” interface, this will be used for private network, then press “Edit”. Then check the box “Connect automatically”. Select “IPv4 Settings” tab; change Method to “Manual”. Press “Add” and fill Address: 192.168.10.1; Netmask: 255.255.255.0; Gateway: 0.0.0.0. When done, press “Apply”:
33
Step25: Finally select “System eth2” interface, this will be used for Internet, then press “Edit”. Check the box “Connect automatically”. Select “IPv4 Settings” tab make sure the Method is set to “Automatic (DHCP)”.Press “Apply” button:
34
35
Step26: Click Next
36
Step27:Give password for root
37
Step28:
38
Step29:Click next
39
Step30:Select on Format
40
Step31:Select Write Changes to disk
41
Step32:Click Next
42
Step33: Select Database Server option and select Customize now and Click Next
43
Step34:Select Tiger VNC (Not Manadatory). I sometimes prefer using vnc
44
Step35:Select options as below for Desktop and Click Next
45
48
49
NOW Sit and Relax.
50
We are done with the installation of OEL 6.5: Click Reboot.
36:After Reboot: Click on Forward
51
37:Licence Info: Click Forward
52
Step38:Click Forward
53
Step39:Select connect later
54
Step40:Click Forward
55
Step41:Click Forward
56
Step42:Select Finish
57
58
Step43:First of all check whether we can connect to the internet or not
59
Change the /etc/hosts entries as below
# Public
192.168.56.71    rac1.localdomain       rac1
192.168.56.72    rac2.localdomain       rac2
# Private
192.168.10.1    rac1-priv.localdomain   rac1-priv
192.168.10.2    rac2-priv.localdomain   rac2-priv
# Virtual
192.168.56.81    rac1-vip.localdomain   rac1-vip
192.168.56.82    rac2-vip.localdomain   rac2-vip
# SCAN
192.168.56.91    rac-scan.localdomain   rac-scan
192.168.56.92    rac-scan.localdomain   rac-scan
192.168.56.93    rac-scan.localdomain   rac-scan
61
Step44: Install Virtual BOX Software
62
Step45:Click Ok
63
Step47:Click on RUN
64
Step48: It is failed. We need to update packages.
65
Please follow steps provided in below link to resolve this issue
Once finishing the steps provided in above link Reboot the Server.
Once again try to install VM tools
01
02
Reboot.
Purpose we will be able to view the shared folders in Linux Guest.
Step51: Now we need to disable the firewall: Linux Main menu | System | Administration | Firewall. Click on “Disable” icon, then on “Apply”.
03
Stop and Disable
04
04
Step52: Copy the software from shared folder to tmp and change the permissions to read write execute on zip files
05
Step53: Install oracle-rdbms-server-11gR2-preinstall using yum
06
07
Install ASM packages as below
08
Create group and user
groupadd -g 1000 oinstall
groupadd -g 1200 dba
useradd -u 1100 -g oinstall -G dba oracle
passwd oracle
Passwd oracle
Create Passwd for oracle user
Step54: Create the directory in which the Oracle software will be installed.
mkdir -p  /u01/app/11.2.0.3/grid
mkdir -p /u01/app/oracle/product/11.2.0.3/db_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01/
Step55: Disable secure linux by editing the “/etc/selinux/config” file, making sure the SELINUX flag is set as follows.
SELINUX=disabled
Change Enforcing to disabled
09
Add or amend the following lines to the “/etc/sysctl.conf” file.
fs.aio-max-nr = 1048576
fs.file-max = 6815744
#kernel.shmall = 2097152
#kernel.shmmax = 1054504960
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=1048586
Run the following command to change the current kernel parameters.
/sbin/sysctl –p
10
Add the following lines to the “/etc/security/limits.conf” file.
oracle              soft    nproc   2047
oracle              hard    nproc   16384
oracle              soft    nofile  4096
oracle              hard    nofile  65536
oracle              soft    stack   10240
# service iptables stop
# chkconfig iptables off
Step57: Either configure NTP, or make sure it is not configured so the Oracle Cluster Time Synchronization Service (ctssd) can synchronize the times of the RAC nodes. If you want to deconfigure NTP do the following.
# service ntpd stop
Shutting down ntpd:                                        [  OK  ]
# chkconfig ntpd off
# mv /etc/ntp.conf /etc/ntp.conf.orig
# rm /var/run/ntpd.pid
If 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"
Then restart NTP.
# service ntpd restart

11
12
Now we will shut down the server as we need to add asm disks. Before we add asm disks. We will backup our vm
Backup VM.
Click File export Appliance
13
14
Select our VM and click next Save to some location
1515
Click next and click export
16
17
Ok We done with the backup now add disk’s for ASM storage.
TO add disks click on storage
01
02
03
04
06
0608
Once this is done
Now Restore the Backup that was taken earlier and change it as Rac2
09
10
Change the name to RAC2
11
Scroll down
12
Click Import
After import we got RAC2 VM
13
Change the disks to shared  that were created earlier for ASM
14
15
16
Do the same for all the ASMDISK’s
Now once this is done click on RAC2 Vm and Storage
17
18
19
20
Repeat same for other 2 asm disks
21
Now start the Rac2 server Make sure sure RAC1 IS DOWN
22
The main purpose of starting the server is that we have to configure Network
If we see here it is still rac1. Hostname has to be changed
23
Change the hostsname
24
25
Change the IP addresses
01
02
03
04
Reboot
If there is any problem then restart network services
Service network restart
Start RAC1 and check whether you are able to ping the hosts as below from rac1
06
05
Install Oracleasmlib. I have downloaded file from
07
08
09
10
11
12
Do the same with other storage devices i.e for /dev/sdc and /dev/sdd
Configure OracleASM
Configure ASMLib using the following command.
# oracleasm configure -i
13
/usr/sbin/oracleasm init
14
15
On RAC2
16
We are done with everything
now unzip the grid software
1
install cvqdisk* rpm
02
Execute the runInstaller.sh
03
04
05
06
Click on SSH Connectivity..
07
Give the password for grid and click next…
0708
provide passwords in below screenshot.
091011121314
Install missed RPM’s
Lets install one after the other using yum
1516171819202122
24
This issue is due to wrong groups used. Change the groups as provided in the screenshot.
25
The other two issues can be ignored.
2627282930313233343536
We are done with running root.sh on both nodes
3738
Ignore error regarding SCAN- this can be resolved by performing action plan provide above error information Click Next and finish the installation.
SCAN Issue can be resolved using below provided below
 Install the DAtabase
01 02 03 04 05 06 07 08 09 10 11 12
SCAN Issue can be resolved using below
 [root@rac1]# mv /usr/bin/nslookup /usr/bin/nslookup.original
Next, create a new shell script named /usr/bin/nslookup as shown below while
replacing 24.154.1.34 with your primary DNS, rac-scan with your
SCAN host name, and 192.168.56.91 with your SCAN IP address:
#!/bin/bash
HOSTNAME=${1}
if [[ $HOSTNAME = "racnode-cluster-scan" ]]; then
 echo "Server: 24.154.1.34"
 echo "Address: 24.154.1.34#53"
 echo "Non-authoritative answer:"
 echo "Name: racn-scan"
 echo "Address: 192.168.56.91 "
else
 /usr/bin/nslookup.original $HOSTNAME
fi
Finally, change the new nslookup shell script to executable:
[root@rac1 ~]# chmod 755 /usr/bin/nslookup
Remember to perform these actions on both Oracle RAC nodes.
The new nslookup shell script simply echo's back your SCAN IP address whenever the CVU calls nslookup with your SCAN host name; otherwise, it calls the original nslookup binary.  The CVU will now pass during the Oracle grid infrastructure installation when it attempts to verify your SCAN: 

13 14 15 16 17 18 19 20 21 22 23 24 25 26
This finishes the installation of RAC.
You can create your own profiles for accessing grid and Oracle Database.

No comments:

Post a Comment

OEM Agent Installation

./agentDeploy.sh AGENT_BASE_DIR=/u001/oracle/product/agent13c OMS_HOST=oem-dev.xxx.com EM_UPLOAD_PORT=1159 AGENT_REGISTRATION_PASSWORD=*****...