Sunday, 6 May 2018

Oracle RAC installation on linux step by step 11.2.0.4 (Part-2)

In the last post, we covered the installation and configuration of Oracle Virtual Box. We also installed Oracle Linux 7.5 on newly created VM. In this post, we will cover following topics:
  1. Edit Network Configuration files
  2. Install Oracle ASM Libraries
    •  kmod-oracleasm
    • oracleasm-support
    • oracleasmlib
  3. Create Users and Groups
  4. Create Shared ASM Disks
  5. Install Oracle Grid Software
  6. Apply patch to Oracle GRID
  7. Install Oracle RAC Database
Let's start:

Login into the node1 server and follow the instructions as mentioned in bitmap.

Step 1: We will edit Network Configuration files of the node1 server. Open the Ethernet configuration for enp0s3 (Ethernet names may be different as per your system network adapter).

We are going to use STATIC IPs instead of dynamic one. In this case, we have to edit network files to set static IPs.



Step 2: Select the public network adapter(enp0s3) and click on settings icon.




Step 3: Select the corresponding MAC address.




Step 4: Disable IPv6 settings and click on apply.


Step 5: Enter the public IP of the node1 and it's netmask. Click Apply.



Step 6: Re-enable the adapter (see step 1 & 2). Ensure that properties of the adapter looks like below bitmap.


Step 7: Repeat step 2-4 for private adapter(enp0s8). Enter the private IP of the node1.


Step 8: Re-enable the network adapter (see step 1 & 2). Ensure the properties of the adapter looks like below bitmap.


Step 9: Reboot the node1. After reboot, check the output ifconfig, it should look as shown in bitmap: Here, enp0s9 is my Bridge Network Adapter which allows VM to connect external world.



Step 10: Disable Firewall on both nodes to avoid any connectivity issue.

Step 11: Ensure that we are able to access Internet inside VM. If not, you cannot proceed with next step. Please fix the network issue, then go to next step.




Step 12: Install ASM Libraries. Execute below commands to install required ASM libraries and rpms.

  1. yum install kmod-oracleasm
  2. yum install oracleasm-support
  3. yum install oracle-rdbms-server-11gR2-preinstall.x86_64
  4. rpm -ivh oracleasmlib-2.0.12-1.el7.x86_64.rpm




Step 13: Edit hosts file of node1. Enter the below details in the file.Don't delete the first two lines.




Step 14: Change the hostname of the server using below command. Reboot the server to reflect the changes.



Step 15: Create Users and groups required for this environment.Execute the steps mentioned in the bitmap.



Step 16: Create directories needed for this setup. Execute the below commands.



Step 17: Although we have disabled the firewall, it will restart on reboot. So change this SELINUX value to permissive in /etc/selinux/config file on both nodes.

Step 18: Set password for users: grid and oracle
# passwd grid
# passwd oracle

Step 19: Now, node1 is ready for cloning as node2 server. Please follow the steps mentioned in bitmaps.

Power off the node1 and clone it.




Step 20: Power on node2 and we have to edit the ethernet configuration files to change the MAC address, as it got reinitialized while cloning.

Login as root and go to /etc/sysconfig/network-scripts directory. Change the value of HWADDR parameter with current MAC value of the adapter. Edit the following files:

ifcfg-enp0s3
ifcfg-enp0s8

To find the ethernet MAC, use the below command as used in the bitmap below.



After update this, ensure IP, Device and HWADDR in the file are correct.



Step 21: Change the hostname to node2 as discussed in step 14. Reboot node2 to reflect the changes.

Step 22: Ensure following pings are successful.

  1. At node1: #ping 192.168.1.164
  2. At node1: #ping 10.1.1.164
  3. At node2: #ping 192.168.1.163
  4. At node2: #ping 10.1.1.163

Step 23: (On node1)Create Shared Disk. Follow below steps to create disk (4 disks) and share the disk between both servers.
Click on Create new disk. Repeat the same steps to create other disks.




Step 24: Change the property of the disks to make them shareable. Open Virtual Media Manager from File menu. Repeat the same steps for other 3 disks.


Change it to Shareable Type

Step 25: Add these disks to node2 server. While adding disk, select choose existing disk and add created disks above to this node.



Step 27: These disks need to be partitioned to make them candidate disk for ASM. I have written a blog on "How to create disk partition in Linux/Unix ?". Follow the commands highlighted in the bitmap below:



Repeat the above step for remaining disks. After successful partition, your partitions should look like this. Here, sdb1, sdc1, sdd1 and sde1 are new partitions


Step 28:(On node1) Initialize the Oracle ASM libraries. Input should be as it is highlighted in bitmap.

Configure the on-boot properties of the Oracle ASM library.

(As root user)- #/usr/sbin/oracleasm configure -i

Enter username: grid
Enter group name: asmdba



Repeat the above step on node2 server. Here, 0 shows command executed successfully.


Check the status of Oracle ASM libraries, if it is loaded?

Step 29: Create ASM disks pointing to physical disks added on both servers.




Step 30: (On node1) Scan and list asm disks



Repeat the above steps on node2 server.


Step 31: Pre-requisites for Oracle RAC installation is completed now. It's time to take snapshot of VMs so that we can go back to previous state if we do something wrong in installation. Steps to take snapshot mentioned in bitmap. Take snapshot of both servers.


Step 32: Create a stage folder under /u01 as below and move Oracle grid software from your host machine to VM using WINSCP - use public ip(10.1.1.163) to connect.

1. Login into the node1 server as grid user.
2. #mkdir /u01/stage
3. Copy the software under this directory as grid user
4. Unzip the software
5. Ensure that this directory must have ownership of grid user.


Step 33: Follow below steps to start the OUI installer.

  1. On node1,as root user, run xhost +
  2. As root user, echo $DISPLAY
  3. Use the output of previous step to set DISPLAY variable for grid user.
  4. Go to /u01/stage
  5. As grid user, run the runInstaller.


Step 34: Follow the instructions of OUI to perform the installation.

DO NOT RUN root.sh script without applying the Oracle patch (p18370031_112040_Linux-x86-64 for below bug found in 11.2.0.4 release.

Oracle Bug: While executing root.sh scripts , you will encounter below error.




Fix: Apply the patch on both node sequentially. Once patch applied successfully, re-run the root.sh on node1 and wait till it completes without any error. Then, re-run root.sh on second node.

For more detail, please follow the link.

http://oracle-help.com/oracle-rac/crs-2101the-olr-was-formatted-using-version-3/

Visit this blog for Oracle RAC installation on linux step by step 11.2.0.4 (Part-1)
Visit this blog for Oracle RAC 11.2.0.4 Installation Screenshots.

I hope it helps.

All the best.

See you soon...

No comments:

Post a Comment