Step by Step installing Oracle 10g RAC on VMware Posted by Kamran Agayev A. on April 5, 2011 In this guide I’m going to show you the process of creating Oracle 10g R2 RAC on OEL4. First of all I have to mention that I’ve prepared this guide based on the well known RAC on VMWare guide of for Vincent Chan which can be found at OTN. After using that guide I’ve decided to create a more screenshot based explained guide and prepared this blog post which contains 150 screenshots! These days wordpress.com is working veeeeery slowly, so it took me two days to upload all images and create this blog post That was really boring. But now the blog post is online and I would be glad to hear the visitors valuable feedbacks. In this tutorial, we use OEL4 because Oracle 10gR2 is not compatible with OEL5 (as the db was released before the OS released) As in my all tutorials, I use vmware virtual machine. In this guide I will create two virtual machines. Let’s start creating the first machine. But before it, create three directories inside one folder (for example c:\vmware) 1 C:\vmware\
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Step by Step installing Oracle 10g RAC
on VMware
Posted by Kamran Agayev A. on April 5, 2011
In this guide I’m going to show you the process of creating Oracle 10g R2 RAC on OEL4. First of all I have to mention that I’ve prepared this guide based on the well known RAC on VMWare guide of for Vincent Chan which can be found at OTN. After using that guide I’ve decided to create a more screenshot based explained guide and prepared this blog post which contains 150 screenshots!
These days wordpress.com is working veeeeery slowly, so it took me two days to upload all images and create this blog post That was really boring. But now the blog post is online and I would be glad to hear the visitors valuable feedbacks.
In this tutorial, we use OEL4 because Oracle 10gR2 is not compatible with OEL5 (as the db was released before the OS released) As in my all tutorials, I use vmware virtual machine. In this guide I will create two virtual machines. Let’s start creating the first machine. But before it, create three directories inside one folder (for example c:\vmware)
1C:\vmware\rac1
2
3C:\vmware\rac2
4
5C:\vmware\sharedstorage
Create the following virtual machine in the first folder and create all shared storages in the third folder
After creating the first device, create more three devices with 4GB in size (asmdisk1.vmdk, asmdisk2.vmdk, asmdisk3.vmdk) and make all of them “Independent->Persistent” and don’t allocate the disk space for each of them
Next, start changing the device node for each of them. Start from the firstly added hard drive, select it, click on Advanced button and make it SCSI 1:0. For next hard drive make it 1:1 and so on
Specify ‘/’ as a mount point, make its files system “ext3” and make the End Cylinder 900 (to make the size of the root folder 7Gb). Check “Force to be a primary partition” and click Ok
Edit /boot/grub/grub.conf file and add “clock=pit nosmp noapic nolapic” to the line that reads kernel /boot
The “clock=pit” prevents the clock for running to quickly and “nosmp noapic nolapic” prevents the clock from running too slowly. After you make the change, reboot the machine for change to take effect
Now switch to oracle user with “su – oracle” command. Make sure all environment variables are set (echo $ORACLE_HOME). After that, create the following directories:
Now mount the third installation cd of the OEL4, connect it and open new terminal. Switch to the RPMS folder inside the cd and install “libaio-0.3.105-2.i386.rpm” and “openmotif21-2.1.30-11.RHEL4.6.i386.rpm” packages
Now let’s configure the network configuration files. For this we need to add IP addresses and hostnames to the /etc/hosts file in each node and test the connection by pinging the hostnames
view source
print ?
01
127.0.0.1 localhost
0203
192.168.2.131 rac1.test.az rac1
0405
192.168.2.31 rac1-vip.test.az rac1-vip
0607
10.10.10.31 rac1-priv.test.az rac1-priv
0809
192.168.2.132 rac2.test.az rac2
1011
192.168.2.32 rac2-vip.test.az rac2-vip
1213
10.10.10.32 rac2-priv.test.az rac2-priv
Try the connection by pinging all hostnames (don’t ping VIP addresses as they will be created during clusterware installation):
Then from Hardware Device type click on “Probe” button to get new MAC address, enable both network devices, change hostname to rac2.test.az and click Ctrl+S to save the changes. Then add the following line to the /etc/hosts file
Now it’s time to establish user equivalence with SSH. Oracle Universal Installer installs the binaries in one node and then propagates the files to the other nodes. For this, it uses ssh and scp command in the background during installation to run remote commands and copy files to the other cluster nodes. So SSH must be configured so that these commands not prompt for a password. For this power on the first machine, login with root user, switch to the oracle user and generate RSA and DSA key pairs
su – oracle
ssh-keygen –t rsa (click Enter twice)
ssh-keygen –t dsa (click Enter twice)
Perform above steps in the second node (rac2)
Now (from rac1) add the generated keys to the ~/.ssh/authorized_keys file
After performing all above steps, you should successfully open SSH connection from rac1 to rac2 and vice verse. So run the following commands in both nodes and ensure that you’re not prompted for the password for the second time:
Then create ASM disks on any node (try on the first node – rac1) with a root user:
/etc/init.d/oracleasm createdisk VOL1 /dev/sdc1
Marking disk “/dev/sdc1″ as an ASM disk: [ OK ]
/etc/init.d/oracleasm createdisk VOL2 /dev/sdd1
Marking disk “/dev/sdd1″ as an ASM disk: [ OK ]
/etc/init.d/oracleasm createdisk VOL3 /dev/sde1
Marking disk “/dev/sde1″ as an ASM disk: [ OK ]
Verify that the ASM disks are visible from every node.
/etc/init.d/oracleasm scandisks
Scanning system for ASM disks: [ OK ]
/etc/init.d/oracleasm listdisks
VOL1
VOL2
VOL3
Now let’s configure Oracle Cluster File System (OCFS2). For this, run “ocfs2console” with a root user from the first node. Then from the Cluster menu select Configure Nodes, click Add button and apply both nodes:
Now format the file system on the first node (rac1). For this run ocfs2console program, select Format from the Tasks menu and click OK to format the drive. Press Ctrl+Q to quit
Now execute the following command on both nodes to mount the files system
mount -t ocfs2 -o datavolume,nointr /dev/sdb1 /ocfs
and add the following line to the /etc/fstab to mount the files system on boot
After running the second script on the second node (rac2) you’ll get an error (on running VIPCA), so you need to run it manually. Switch to the following directory
After running the second script on the second node (rac2) you’ll get an error (on running VIPCA), so you need to run it manually. Switch to the following directory
Now copy the installation of the database (Oracle 10gR2) to the /tmp directory, unzip and start the installation. You need to start the installation with an oracle user, so run “xhost +” from the root user to allow the connection to the X server and switch to the oracle user
As you see, the state of disk group shows that it’s not mounted on the second node. For this, we need to restart the second node. Click on Finish and restart the second node. After it starts, login with root user and call dbca from the first node again.
Uncheck “Configure the Database with Enterprise Manager” as it’s taking too much (some hours) to finish (however, if you have enough RAM, you can check it) and click Next
After all, check the status of the Clusterware. As you see, some applications are with “OFFLINE” state. To make them online, stop and start them with SRVCTL utility as it’s shown above
Now let’s create a Service. Services are used to manage the workload in an RAC environment and provide high availability. To create the service run “dbca”
When you specify PREFERRED instances, you are specifying the number of instances on which a service will normally run. The Oracle Clusterware attempts to ensure that the service always runs on the number of nodes for which you have configured the service. Afterwards, due to either instance failure or planned service relocations, a service may be running on an AVAILABLE instance
Select Preferred for the first instance, and Available for the second instance, change the TAF policy to Basic and click Finish
After the Service created automatically, check tnsnames.ora file and you’ll see that the new entry is added
When you specify PREFERRED instances, you are specifying the number of instances on which a service will normally run. The Oracle Clusterware attempts to ensure that the service always runs on the number of nodes for which you have configured the service. Afterwards, due to either instance failure or planned service relocations, a service may be running on an AVAILABLE instance
Select Preferred for the first instance, and Available for the second instance, change the TAF policy to Basic and click Finish
Try to connect to the database using this service. As you see, we’ll automatically connect to the first instance. Now let’s check the RAC high availability
Now go back to the first session and query the v$instance view again. As you see, you’ll be automatically forwarded to the second instance
In this step by step tutorial I’ve shown you the deep step by step guide using 150 screenshots to make the RAC installation easier for you. I hope you’ll successfully install RAC and make your own tests. Good Luck!
This entry was posted on April 5, 2011 at 1:16 pm and is filed under Administration, RAC issues. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
77 Responses to “Step by Step installing Oracle 10g
RAC on
Iss said
April 11, 2011 at 8:06 pm
Hi kamran,
im not able able to ping the rac2 machine. im getting destination host unreachablethis what i have on both /etc/hosts file
Media State . . . . . . . . . . . : Media disconnectedConnection-specific DNS Suffix . :
C:\Users\Administrator>
M. Imran said
May 27, 2011 at 8:07 pm
Dear Kamran,How I can check that my OLE 4.8 vmware is sharing disks.
I have fallowed the steps carefully but my OCFS2 disk not mount at second node, I can’t see it on second node after mounting it successfully on node1 (server of ocfs)
I check /etc/ocfs2/cluster.conf that is properly formatted and when I check status of o2cb it shows me Active heartbeat at node1 only.
I am using vmware 7 workstation, my vmx file is as fallows. I am great-full for you help.