You are on page 1of 67

Oracle Real Application Clusters on a Virtual Machine I Step By Step Install of Linux

Alejandro Vargas Principal Support Consultant Oracle Advanced Support Services

About this Procedure.................................................................................................................................................. 2 Why Linux on a Virtual Machine................................................................................................................................. 2 Summary of steps covered on this document ............................................................................................................ 2 Prerequisites .............................................................................................................................................................. 2 Install and Configuration Steps .................................................................................................................................. 3 1. Download and install VMware server ..................................................................................................................... 3 2. Download Enterprise Linux from Oracle................................................................................................................. 3 3. Create a Linux Virtual Machine .............................................................................................................................. 9 4. Install Linux on The First Virtual Machine ............................................................................................................ 38 End of the Document ............................................................................................................................................... 67

About this Procedure


This procedure is the first step of a series of 5 for configuring RAC on Linux using VMware. The series include the following documents: Linux Install on VMware Configure Linux for RAC on VMware Create and Configure the 2nd Linux Node Install RAC on 2 Linux Nodes for RAC on VMware Tests and Trials with RAC on Linux on VMware

Why Linux on a Virtual Machine


Linux on VM provides an excellent environment for test and training. Complex install procedures or crash and burn tests can be easily executed and reproduced, and the environments can be quickly restored from backups, ready for the next round of trials.

Summary of steps covered on this document


Download and install VMware server Download Enterprise Linux from Oracle Create a Linux Virtual Machine Install Linux Enterprise Edition

Prerequisites
To implement the whole series you will need 20 GB of free space and 2 GB of memory A single instance can be installed having 8 GB of free space and 1 GB of memory on the guest machine.

Install and Configuration Steps


1. Download and install VMware server
Download VMware server from http://www.vmware.com/download/server

If you have a previous version or another VMware product installed you must uninstall it first, and then proceed with the installation.

2. Download Enterprise Linux from Oracle


1. Download Enterprise Linux from Oracle Edelivery site http://edelivery.oracle.com/linux

2. Click on continue:

3. Register and agree to the conditions

4. Choose Enterprise Linux 32 bits and click on Go

5. Choose Enterprise Linux 4 Update 5 Media Pack for x86 (32 bit) Release 4.5.0.0.0

6. Download the 4 Linux media packs, V10378-01/02/03 and 04

5. You may download the 4 ISO files in parallel, it will take about 1.5 hours on a 100Mbps network.

6. Once the download finishes unzip the downloaded files

7. You may use the ISO files from your Hard Disk, or you may burn a DVD.

3. Create a Linux Virtual Machine


1. Prepare the structure for RAC Create on your PC or Laptop the directory structure to hold the RAC install, be sure that you have about 20GB free. In this example one node will be called castor, the second node pollux, and we did set a third directory castor_pollux_shared where we will locate the shared disks to be used byASM, and an OCFS2 OCR, Votingdisk and ASM spfile.

2. Start VMware Server, choose local host

3. Click on New Virtual Machine

4. Click Next on the welcome screen

5. Select Custom Configuration and click on next

6. Select Guest operating system 'Linux' and choose Version Enterprise Linux 4

7. Set the name and location of your virtual machine, choose as location the directory we created for the first node on step 3.1

8. Mark the checkbox to make this virtual machine private

9. Choose to run the virtual machine as the user that powers it

10. Choose one processor

11. Set the memory to 700 MB If you are using a laptop or PC with 2GB 700 MB per machine will work fine.

12. Select bridged networking

13. Choose LSI Logic I/O adapter type

14. Choose Create a new virtual disk

15. Choose disk type SCSI

16. Set disk capacity to 20GB deselect 'allocate all disk space now', select 'Split disk into 2 GB files' Note that you will not use the 20GB allocated, this upper limit will permit the disk to grow freely during the Linux install.

17. Click on browse to choose the directory we prepared for this node

19. Set the name of the disk to localdisk, the vmdk extension will be appended to it

20. Click on finish

21. We have the basic setup ready

22. Click on Edit virtual machine settings

23. Click on add to enter the window to add components

24. Next on the welcome screen

25. Choose Hard Disk and click on next

26. Click on Create a new virtual disk and select type SCSI

27. Select Virtual Disk Type SCSI

28. Enter Capacity 0.5 GB. Also for ocfs2 mark the checkbox Allocate all disk space now. Later we will come back to this step to configure ASM disks: asm1 3GB, asm2 3GB and asm3 2GB For the ASM disks the checkbox Allocate all disk space now should be unchecked. We will use this disk ocfs2 to configure an ocfs2 file system to locate on it OCR, Voting Disk and ASM spfile.

29. Click on browse to change the default location and name for this disk.

30. Select the shared folder we created on step 3.1.

31. Enter file name ocfs2

32. Click on the Advanced button to perform additional configuration

33. Click SCSI 0:1 to setup the Virtual device node Later, when setting up ASM disks use the following values: asm1, SCSI 1:1, asm2, SCSI 1:2 asm3, SCSI 1:3

34. Mark the Independent check box and click on Persistent

34. Wait until the disk is created

35. Repeat steps 25 through 34 to add three aditional disks On the next steps we will add 3 additional disks using the same configuration we used for ocfs2. All of them will be located on VM/castor_pollux_shared They will be defined as Independent and Persistent. And they will be : asm1, 3 GB on device SCSI 1:1, asm2, 3 GB on device SCSI 1:2 asm3, 2 GB on device SCSI 1:3 Once you finish to add these disks we can see all of them on the summary screen

36. Add 2 Ethernet adapters

On this step we will add to the existing Bridged Ethernet adapter 2 new Ethernet adapters, one will be defined with network type 'Host Only' to be used by the private interconnect and the other with network type 'NAT' to be used to connect to the internet when necessaire. The final configuration will be: Eth0 Eth1 Eth2 bridged Host Only NAT public and virtual IPs private interconnect to share the connection to internet with the guest system

Only eth0 and eth2 are necessaire for creating the RAC environment, eth2 is convenient to download rpms from the internet and transfer files from the guest system. Note that in some Laptops may happen that network type 'Host Only' is not available, in this case choose network type 'Bridged' Click on add component, and next on the welcome window of the add components wizard.

37. Choose Ethernet Adapter

38. Choose Host Only, the network card will be used by the private interconnect

39. Repeat steps 36 through 38 to add another Network connection Choose Network connection of type NAT, we will use it to connect to the Internet when needed.

40. On the virtual machine settings window remove the floppy disk In some installation the floppy disk may not be present.

41. Configure the CD-ROM device to read the install disks.

If you choose to install from the Linux ISO images on disk, click on Use ISO image and click on Browse to navigate to the folder where the Linux ISO images are located

42. Select the first ISO image from disk and click on Open

If you did burn a DVD with the ISO images, choose Use physical drive and your DVD drive.

43. The first node configuration almost ready

44. Edit configuration settings to the VM configuration file. Open for edit the file "D:\VM\castor\Red Hat Enterprise Linux 4.vmx" using Notepad On explorer you can see as file type Vmware Configuration File

45. Add to the configuration file the lines on bold and save
config.version = "8" virtualHW.version = "4" scsi0.present = "TRUE" scsi0.virtualDev = "lsilogic" memsize = "700" scsi0:0.present = "TRUE" scsi0:0.fileName = "localdisk.vmdk" ide1:0.present = "TRUE" ide1:0.fileName = "Z:\Linux-Oracle\Enterprise-R4-U5-i386-disc1.iso" ide1:0.deviceType = "cdrom-image" floppy0.fileName = "A:" Ethernet0.present = "TRUE" displayName = "Castor" guestOS = "rhel4" priority.grabbed = "normal" priority.ungrabbed = "normal" disk.locking = "FALSE" diskLib.dataCacheMaxSize = "0"

scsi1.sharedBus = "virtual" scsi1.present = "TRUE" scsi1:0.present = "TRUE" scsi1:0.fileName = "D:\VM\castor_pollux_shared\ocfs2.vmdk" scsi1:0.mode = "independent-persistent" scsi1:0.deviceType = "disk" scsi1:1.present = "TRUE" scsi1:1.fileName = "D:\VM\castor_pollux_shared\asm1.vmdk" scsi1:1.mode = "independent-persistent" scsi1:1.deviceType = "disk" scsi1:2.present = "TRUE" scsi1:2.fileName = "D:\VM\castor_pollux_shared\asm2.vmdk" scsi1:2.mode = "independent-persistent" scsi1:2.deviceType = "disk" scsi1:3.present = "TRUE" scsi1:3.fileName = "D:\VM\castor_pollux_shared\asm3.vmdk" scsi1:3.mode = "independent-persistent" scsi1:3.deviceType = "disk" scsi1.virtualDev = "lsilogic" floppy0.present = "FALSE" Ethernet1.present = "TRUE" Ethernet1.connectionType = "hostonly" Ethernet2.present = "TRUE" Ethernet2.connectionType = "nat"

4. Install Linux on The First Virtual Machine


1. Click on start this virtual machine On the VM console click on start this virtual machine

2. Start Linux Install Having the CD-ROM pointing to the 1st ISO image the Linux installer is started automatically. Double click on the Enterprise Linux screen to move the cursor inside the virtual machine. Press enter to install in graphical mode

3. Skip the media test

4. Click on Next

5. Choose language and click on Next

6. Choose your keyboard

7. Select manual partition with Disk Druid

8. Click on yes to the warnings related to the initialization of the disks defined for this virtual machine. The installer will point to the disks we defined for this virtual machine, Linux will be installed on localdisk identified here as sda

9. Double click on /dev/sda free space to create the first partition

10. Add partition at mount point "/", set end cylinder to 910

11. Again double click on /dev/sda free space to create a swap partition

12. Select File System Type 'swap' and End Cylinder 1170

13. Again double click on /dev/sda free space to create a partition to hold Oracle Homes

14. Enter mount point /u01 We will use it to install the Oracle Homes, accept the default last cylinder to use all the space available for this partition

15. Leave the rest of the disks untouched and click on next We will format the ocfs and asm disks using fdisk after finishing the Linux install

16. Boot Loader Configuration, accept the default, click on next

17. Configuration of Network Device eth0, select and click on edit Eth0 will be used for Public and Virtual IP

18. Unselect DHCP Select Activate on boot IP: 192.168.2.131 Netmask: 255.255.255.0 Click on OK

19. Edit eth1 it will be used for RAC Private interconnect

20. Unselect DHCP Select Activate on boot IP: 10.10.10.31 Netmask: 255.255.255.0 Click on OK

21. Edit eth2 it will be used for internet connection if needed

22. Select DHCP Select Activate on boot Using DHCP IP address will be assigned automatically. Click on OK.

23. Set the hostname manually

24. On miscellaneous settings enter gateway 192.168.2.1 Click on Next 25. Select No Firewall

26. Leave SELinux Active

27. A warning will be raised because Firewall was not activated, click on Proceed

28. Select the main and secondary languages to install

29. Select your time zone

30. Enter your root password

31. Choose Customize software packages to be installed

When choosing customize you will get a set of default packages. To this default set add the following packages: Editors, Graphical Internet, Office productivity, Sound and Video, Graphics, FTP server. On Legacy Network Server add : rsh and telnet On System Tools add ocfs2 that match your kernel + ocfstools and console, and oracleasm Add printing support also

32. Click on Next to begin Installation

33. Click Continue on the Required Install Media window.

34. The install process may take about 45 minutes, we will be required to change disks during the install process

35. When requested to insert disc 2, point you CD-ROM to the 2nd ISO image

To change the pointer of your CD-ROM click on the summary view icon on top of the VM screen

Double click on the CD-ROM

Browse to the ISO's folder and choose the second disc

Click on OK

Click on the Console icon of the VM to return to the install screen

Click on OK to continue

36. Wait for the installer to finish. It will continue working for several minutes

37. When requested switch to ISO image disc 3 as you did with the previous disc See step 35 for instructions about switching disks

38. When the install process finish you need to reboot, after pointing you CD-ROM to an empty device.

On the VM console point your CD-ROM to use your physical drive Take care that no disk is inside the CD-ROM drive.

39. Then press reboot

40. Once the system boots click on Next on the Welcome screen

41. Agree to the license agreement

42. Set the date and Time

43. Click Next on Display

44. Click Next on System User

45. Click Continue on the Create Account Warning window

46. Click Next on additional CD's

47. Click Next on finish setup

49. Log in as root

Congratulations! You finished the Enterprise Linux Install

The Enterprise Linux distributed by Oracle contains all the necessary components to run 10g RAC On the Next Dcoument we will configure this environment for RAC.

End of the Document

You might also like