Oracle RAC 11gR2 Installation on VMserver

Oracle RAC 11gR2 Installation on VMserver

Before Installing RAC we have to install VMserver and has to setup Virtual Machine

a)VMSERVER INSTALLATION

b)VIRTUAL MACHINE SETUP

c)GUEST OPERATING SYSTEM INSTALLATION

d)CREATE SHARED DISKS

Now , Start the Installation of VMserver

VMSERVER INSTALLATION

1)Download VMserver from https://my.vmware.com/web/vmware/info/slug/infrastructure_operations_management/vmware_server/2_0

2)Click on VMware-server-2.0.2-203138.exe from where the file downloaded Follow the screen shots

Oracle RAC 11gR2 Installation on VMserver

Oracle RAC 11gR2 Installation on VMserver

Oracle RAC 11gR2 Installation on VMserver

 Select the Storage Path wherever you want

Oracle RAC 11gR2 Installation on VMserver

Oracle RAC 11gR2 Installation on VMserver

Oracle RAC 11gR2 Installation on VMserver

Oracle RAC 11gR2 Installation on VMserver

It will ask for Reboot.

VIRTUAL MACHINE SETUP

1)click vmserver console & login with your PC id & pwd

Oracle RAC 11gR2 Installation on VMserver

2)Click “Create Virtual Machine” menu option

Oracle RAC 11gR2 Installation on VMserver

3)Enter the name “RAC1” for the Name and accept the standard datastore by clicking “Next” button.

Oracle RAC 11gR2 Installation on VMserver

4)Select “Linux Operating System” and set the version to “Red Hat Enterprise Linux 5(64bit)” & Click “Next

Oracle RAC 11gR2 Installation on VMserver

5)Enter the required amount of memory of 2048MB(here i have given maximum) & processors “2

Oracle RAC 11gR2 Installation on VMserver

6)Select “Create a new Virtual Disk

Oracle RAC 11gR2 Installation on VMserver

7)Set the disk size to “25GB”( i have given 50GB) and click “Next

Oracle RAC 11gR2 Installation on VMserver

8)Click “Add Network Adapter

Oracle RAC 11gR2 Installation on VMserver

9)Select “Bridged” option and click “Next” button

Oracle RAC 11gR2 Installation on VMserver

10)Click the “Use a ISO Image” link, or click the “Next” button.(before that place the iso file in sourced storage location which we given in the installation of vmware server)

Oracle RAC 11gR2 Installation on VMserver

11) Browse the image file

Oracle RAC 11gR2 Installation on VMserver

 click “Next

Oracle RAC 11gR2 Installation on VMserver

12)Don’t  Add a Floppy Drive & “Next

Oracle RAC 11gR2 Installation on VMserver

13)Click the “Add a USB Controller” link, or click the “Next” button.

Oracle RAC 11gR2 Installation on VMserver

14)Click the “Finish” button to create the virtual machine.

Oracle RAC 11gR2 Installation on VMserver

15)Highlight the “RAC1” VM in the “Inventory” pane,then click the “Add Hardware” link in the “Commands” section to the right.

Oracle RAC 11gR2 Installation on VMserver

 16)Click the “Network Adapter” link & “Next

Oracle RAC 11gR2 Installation on VMserver

17)Click the “Finish” button.

Oracle RAC 11gR2 Installation on VMserver

GUEST OPERATING SYSTEM INSTALLATION

1)1)Click “Power On” button to start operating system installation. & go to console under RAC1 vm

Oracle RAC 11gR2 Installation on VMserver

2)Click “Skip” to skip media test & Next

Oracle RAC 11gR2 Installation on VMserver

3)Leave default as it is and click “Next

Oracle RAC 11gR2 Installation on VMserver

4)Leave default as it is and click “Next

Oracle RAC 11gR2 Installation on VMserver

5)Leave default as it is and click “Next” & Yes

Oracle RAC 11gR2 Installation on VMserver

6)Choose eth0 and click “Edit

Oracle RAC 11gR2 Installation on VMserver

7)Input IP address as below:
 192.168.1.101                     255.255.255.0

Oracle RAC 11gR2 Installation on VMserver

8)Choose eth1 and click “Edit” and input I.P address as below:
 192.168.0.101                255.255.255.0

Oracle RAC 11gR2 Installation on VMserver

9)Input hostname as below:
  rac1.oracle.com   &

 Gateway:192.168.1.1

Primary DNS :192.168.1.1

Oracle RAC 11gR2 Installation on VMserver

10)Select your time zone & Next

Oracle RAC 11gR2 Installation on VMserver

11)Input password for root user.

Oracle RAC 11gR2 Installation on VMserver

12)Choose all of the choices below and select customize now click “Next

Oracle RAC 11gR2 Installation on VMserver

13)When prompted, choose the following package groups:
GNOME Desktop Environment
Editors
Graphical Internet
Text-based Internet
Development Libraries
Development Tools
Server Configuration Tools
Administration Tools
Base
System Tools
X Window System
& click Next

Oracle RAC 11gR2 Installation on VMserver

14)Click “Next” to begin installation

Oracle RAC 11gR2 Installation on VMserver

Oracle RAC 11gR2 Installation on VMserver

15)Click “Reboot” when the installation finishes.

Oracle RAC 11gR2 Installation on VMserver

16)Click “Forward”

Oracle RAC 11gR2 Installation on VMserver

17)Disable Firewall

Oracle RAC 11gR2 Installation on VMserver

18)yes & Disable SELinux

Oracle RAC 11gR2 Installation on VMserver

19)Leave Enable kdump unchecked and click “Forward

Oracle RAC 11gR2 Installation on VMserver

20)Set date and time here

Oracle RAC 11gR2 Installation on VMserver

21)You may create user or skip this step

Oracle RAC 11gR2 Installation on VMserver

22)Ignore this step and click “Forward

Oracle RAC 11gR2 Installation on VMserver

23)Click “Finish” and it will reboot again

Oracle RAC 11gR2 Installation on VMserver

24)Go To console home page click on RAC1 & Install VMware Client Tools

Oracle RAC 11gR2 Installation on VMserver

#cd /media/VmwareTools
#cp VMwareTools-7.7*.tar.gz /root/Desktop
#tar -zxvf VMwareTools-7.7*.tar.gz
#cd vmware-tools-distrib
# perl vmware-install.pl
Accept all the default settings and pick the screen resolution of your choice. Ignore any warnings or errors. The VMware client tools are now installed.

#init 6

Post Installation Steps

1) To be consistent with the rest of the article, the following information should be set during the installation process.

127.0.0.1 localhost.localdomain localhost
# Public
192.168.1.101 rac1.oracle.com rac1
192.168.1.109 rac2.oracle.com rac2
# Private
192.168.0.101 rac1-priv.oracle.com rac1-priv
192.168.0.102 rac2-priv.oracle.com rac2-priv
# Virtual
192.168.1.111 rac1-vip.oracle.com rac1-vip
192.168.1.112 rac2-vip.oracle.com rac2-vip
# SCAN
192.168.1.113 rac-scan.oracle.com rac-scan

2)Once the basic installation is complete, install the following packages while logging as root user. This includes the 32 bit and 64 bit version of some packages

#cd /media/OL5.7\ x86_64\ dvd\ 20110728/Server/

rpm -Uvh binutils-2.*
rpm -Uvh compat-libstdc++-33*
rpm -Uvh elfutils-libelf-0.*
rpm -Uvh elfutils-libelf-devel-*
rpm -Uvh gcc-4.*
rpm -Uvh gcc-c++-4.*
rpm -Uvh glibc-2.*
rpm -Uvh glibc-common-2.*
rpm -Uvh glibc-devel-2.*
rpm -Uvh glibc-headers-2.*
rpm -Uvh ksh-2*
rpm -Uvh libaio-0.*
rpm -Uvh libaio-devel-0.*
rpm -Uvh libgcc-4.*
rpm -Uvh libstdc++-4.*
rpm -Uvh libstdc++-devel-4.*
rpm -Uvh make-3.*
rpm -Uvh sysstat-7.*
rpm -Uvh unixODBC-2.*
rpm -Uvh unixODBC-devel-2.*

# For OEL, use relevant versions of the following packages from your media.

rpm -Uvh oracleasm-support-2.1.7-1.el5.x86_64.rpm
rpm -Uvh kernel-debug-2.6.18-274.el5.x86_64.rpm
rpm -Uvh kernel-xen-2.6.18-274.el5.x86_64.rpm
rpm -Uvh oracleasm-2.6.18-274.el5*

3) # umount tmpfs

# mount -t tmpfs shmfs -o size=3000m /dev/shm

4)Make the setting permanent by amending the “tmpfs” setting of the “/etc/fstab” file to look like this.

tmpfs /dev/shm        tmpfs size=3000m    0  0

Oracle RAC 11gR2 Installation on VMserver

If you are not using DNS, the “/etc/hosts” file must contain the following information.

#cat /etc/hosts

127.0.0.1 localhost.localdomain localhost
# Public
192.168.1.101 rac1.oracle.com rac1
192.168.1.109 rac2.oracle.com rac2
# Private
192.168.0.101 rac1-priv.oracle.com rac1-priv
192.168.0.102 rac2-priv.oracle.com rac2-priv
# Virtual
192.168.1.111 rac1-vip.oracle.com rac1-vip
192.168.1.112 rac2-vip.oracle.com rac2-vip
# SCAN
192.168.1.113 rac-scan.oracle.com rac-scan

5)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

6)Add the following lines to the “/etc/security/limits.conf” file.

oracle  soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

Oracle RAC 11gR2 Installation on VMserver

7)Add the following lines to the “/etc/pam.d/login” file, if it does not already exist.
session required pam_limits.so

 

Oracle RAC 11gR2 Installation on VMserver

8)Disable secure linux by editing the “/etc/selinux/config” file, making sure the SELINUX flag is set as follows.
SELINUX=disabled
Alternatively, this alteration can be done using the GUI tool (System > Administration > Security Level and Firewall). Click on the SELinux tab and disable the feature.
9)Create the new groups and users.
#groupadd -g 1000 oinstall
#groupadd -g 1200 dba
#useradd -u 1100 -g oinstall -G dba oracle
#passwd oracle

Create the directories in which the Oracle software will be installed.

#mkdir -p /u01/app/11.2.0/grid
#mkdir -p /u01/app/oracle/product/11.2.0/db_1
#chown -R oracle:oinstall /u01
#chmod -R 775 /u01/

10)Login as the oracle user and add the following lines at the end of the .bash_profile file.

# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_HOSTNAME=rac1.oracle.com; export ORACLE_HOSTNAME
ORACLE_UNQNAME=RAC; export ORACLE_UNQNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME
ORACLE_SID=RAC1; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
if [ $USER = “oracle” ]; then
if [ $SHELL = “/bin/ksh” ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi

 CREATE SHARED DISKS

Shut down the RAC1 virtual machine. Make a directory on the host system to hold the shared virtual disks.

1) On the VMware Intrastructure Web Access Console, click the “Add Hardware” link.

Oracle RAC 11gR2 Installation on VMserver

2)Click on “Hard Disk

Oracle RAC 11gR2 Installation on VMserver

3)Click on “Create a New Virtual Disk” with name “asm1

Oracle RAC 11gR2 Installation on VMserver

4)Choose 8gb as Capacity and Choose location of your choice from your PC

Check “Independent – Persistent” as Disk Mode

Select Virtual Device Node as
Adapter SCSI 1  Device 1

Oracle RAC 11gR2 Installation on VMserver

5)Click Finish to create the disk.

Oracle RAC 11gR2 Installation on VMserver

6)Repeat the previous hard disk creation steps 4 more times, using the following values:

File Name: [standard] shared/asm2.vmdk
Virtual Device Node: SCSI 1:2
Mode: Independent and Persistent

File Name: [standard] shared/asm3.vmdk
Virtual Device Node: SCSI 1:3
Mode: Independent and Persistent

File Name: [standard] shared/asm4.vmdk
Virtual Device Node: SCSI 1:4
Mode: Independent and Persistent

File Name: [standard] shared/asm5.vmdk
Virtual Device Node: SCSI 1:5
Mode: Independent and Persistent
At the end of the process, the virtual machine should look like this:

Oracle RAC 11gR2 Installation on VMserver

7)Edit the contents of the “D:\RAC-vmware-server\RAC1\RAC1.vmx” file using a text editor, making sure the following entries are present. Some of the tries will already be present, some will not.

disk.locking = “FALSE”
diskLib.dataCacheMaxSize = “0”
diskLib.dataCacheMaxReadAheadSize = “0”
diskLib.dataCacheMinReadAheadSize = “0”
diskLib.dataCachePageSize = “4096”
diskLib.maxUnsyncedWrites = “0”
scsi1.present = “TRUE”
scsi1.sharedBus = “VIRTUAL”
scsi1.virtualDev = “lsilogic”
scsi1:1.present = “TRUE”
scsi1:1.fileName = “/u01/VM/shared/asm1.vmdk”
scsi1:1.writeThrough = “TRUE”
scsi1:1.mode = “independent-persistent”
scsi1:1.deviceType = “plainDisk”
scsi1:1.redo = “”
scsi1:2.present = “TRUE”
scsi1:2.fileName = “/u01/VM/shared/asm2.vmdk”
scsi1:2.writeThrough = “TRUE”
scsi1:2.mode = “independent-persistent”
scsi1:2.deviceType = “plainDisk”
scsi1:2.redo = “”
scsi1:3.present = “TRUE”
scsi1:3.fileName = “/u01/VM/shared/asm3.vmdk”
scsi1:3.writeThrough = “TRUE”
scsi1:3.mode = “independent-persistent”
scsi1:3.deviceType = “plainDisk”
scsi1:3.redo = “”
scsi1:4.present = “TRUE”
scsi1:4.fileName = “/u01/VM/shared/asm4.vmdk”
scsi1:4.writeThrough = “TRUE”
scsi1:4.mode = “independent-persistent”
scsi1:4.deviceType = “plainDisk”
scsi1:4.redo = “”
scsi1:5.present = “TRUE”
scsi1:5.fileName = “/u01/VM/shared/asm5.vmdk”
scsi1:5.writeThrough = “TRUE”
scsi1:5.mode = “independent-persistent”
scsi1:5.deviceType = “plainDisk”
scsi1:5.redo = “”

8)Start the RAC1 virtual machine by clicking the “Play” button on the toolbar, then start the console as before. When the server has started, log in as the root user so you can partition the disks. The current disks can be seen by issuing the following commands.

Use the “fdisk” command to partition the disks sdb to sdf. The following output shows the expected fdisk output for the sdb disk.

9) cd /dev/

[root@rac1 dev]#ls -ld sd*

you will find list of disks here

Oracle RAC 11gR2 Installation

10) fdisk /dev/sdb

Follow the screenshot and create disks for sdc sdd sde sdf

diskc

In each case, the sequence of answers is “n”, “p”, “1”, “Return”, “Return”, “p” and “w”.

Once all the disks are partitioned, the results can be seen by repeating the previous “ls” command.

[root@rac1 dev]# ls sd*

disks

11)Configure ASMLib using the following command.

[root@rac1 dev]# oracleasm configure -i

diskc2

12) Load the kernel module using the following command

[root@rac1 dev]# /usr/sbin/oracleasm init

kernel

13)  Create DISKS using the following command

/usr/sbin/oracleasm createdisk DISK1 /dev/sdb1
/usr/sbin/oracleasm createdisk DISK2 /dev/sdc1
/usr/sbin/oracleasm createdisk DISK3 /dev/sdd1
/usr/sbin/oracleasm createdisk DISK4 /dev/sde1
/usr/sbin/oracleasm createdisk DISK5 /dev/sdf1

diskc3

To scan the ASM disks
[root@rac1 dev]# /usr/sbin/oracleasm scandisks

scan

To list the ASM disks

[root@rac1 dev]# /usr/sbin/oracleasm listdisks

diskc4

14) Clone the Virtual Machine

Shutdown RAC1 and make a copy as RAC2 by going into drive

Start RAC2 to make sure that I.P adresses and hostname are configured as directed above and make sure that it can ping each other.

follow the screenshot ping back

ping back

Prior to 11gR2 we would probably use the “runcluvfy.sh” utility in the clusterware root directory to check the prerequisites have been met. If you are intending to configure SSH connectivity using the installer this check should be omitted as it will always fail.So,here no need to run “runcluvfy.sh

Edit the /home/oracle/.bash_profile file on the RAC2 node to correct the ORACLE_SID and ORACLE_HOSTNAME values.
ORACLE_SID=RAC2; export ORACLE_SID
ORACLE_HOSTNAME=rac2.oracle.com; export ORACLE_HOSTNAME
It is good idea to make a backup of both RAC1 and RAC2 before we continue.