Oracle Database 11g Release 2 RAC On Oracle Linux 5.8 Using VirtualBox
This article describes the installation of Oracle Database 11g release 2 (11.2 64-bit) RAC on Oracle Linux (5.8 64-bit) using VirtualBox (4.2.6) with no additional shared disk devices. Note. I've purposely left this as an 126.96.36.199 installation as this version is downloadable from OTN without the need for a My Oracle Support (MOS) CSI. The process works just as well for 188.8.131.52, which you can download from MOS.
; Download Software
; VirtualBox Installation
; Virtual Machine Setup
; Guest Operating System Installation
; Oracle Installation Prerequisites
o Automatic Setup
o Manual Setup
o Additional Setup
; Install Guest Additions
; Create Shared Disks
; Clone the Virtual Machine
; Install the Grid Infrastructure
; Install the Database
; Check the Status of the RAC
; Oracle Database 11g Release 2 (184.108.40.206.0) RAC On Oracle Linux 6.3 Using
; Oracle Database 11g Release 2 RAC On Windows 2008 Using VirtualBox
One of the biggest obstacles preventing people from setting up test RAC environments is the requirement for shared storage. In a production environment, shared storage is often provided by a SAN or high-end NAS device, but both of these options are very expensive when all you want to do is get some experience installing and using RAC. A cheaper alternative is to use a FireWire disk enclosure to allow two machines to access the same disk(s), but that still costs money and requires two servers. A third option is to use virtualization to fake the shared storage.
Using VirtualBox you can run multiple Virtual Machines (VMs) on a single server, allowing you
to run both RAC nodes on a single machine. In addition, it allows you to set up shared virtual
disks, overcoming the obstacle of expensive shared storage.
Before you launch into this installation, here are a few things to consider. ; The finished system includes the host operating system, two guest operating systems,
two sets of Oracle Grid Infrastructure (Clusterware + ASM) and two Database
instances all on a single server. As you can imagine, this requires a significant amount
of disk space, CPU and memory.
; Following on from the last point, the VMs will each need at least 2G of RAM (3G for
220.127.116.11 onward), preferably 4G if you don't want the VMs to swap like crazy. As you
can see, 11gR2 RAC requires much more memory than 11gR1 RAC. Don't assume
you will be able to run this on a small PC or laptop. You won't.
; This procedure provides a bare bones installation to get the RAC working. There is no
redundancy in the Grid Infrastructure installation or the ASM installation. To add this,
simply create double the amount of shared disks and select the "Normal" redundancy
option when it is offered. Of course, this will take more disk space.
; During the virtual disk creation, I always choose not to preallocate the disk space. This
makes virtual disk access slower during the installation, but saves on wasted disk
space. The shared disks must have their space preallocated.
; This is not, and should not be considered, a production-ready system. It's simply to
allow you to get used to installing and using RAC.
; The Single Client Access Name (SCAN) should really be defined in the DNS or GNS
and round-robin between one of 3 addresses, which are on the same subnet as the
public and virtual IPs. In this article I've defined it as a single IP address in the
"/etc/hosts" file, which is wrong and will cause the cluster verification to fail, but it
allows me to complete the install without the presence of a DNS. This approach will
not work if you are using 18.104.22.168 onward and you must use the DNS.
; The virtual machines can be limited to 2Gig of swap, which causes a prerequisite
check failure, but doesn't prevent the installation working. If you want to avoid this,
define 3+Gig of swap.
; This article uses the 64-bit versions of Oracle Linux and Oracle 11g Release 2.
Download the following software.
; Oracle Linux 5.8
; Oracle 11g Release 2 (11.2) Software (64 bit)
First, install the VirtualBox software. On RHEL and its clones you do this with the following type of command as the root user.
# rpm -Uvh VirtualBox-4.2-4.2.6_82870_fedora17-1.x86_64.rpm Once complete, VirtualBox is started from the "Applications > System Tools > Oracle VM VirtualBox" menu option.
Virtual Machine Setup
Now we must define the two virtual RAC nodes. We can save time by defining one VM, then cloning it when it is installed.
Start VirtualBox and click the "New" button on the toolbar. Enter the name "ol5-112-rac1", OS "Linux" and Version "Oracle (64 bit)", then click the "Next" button.
Enter "4096" as the base memory size, then click the "Next" button.
Accept the default option to create a new virtual hard disk by clicking the "Create" button.
Acccept the default hard drive file type by clicking the "Next" button.
Acccept the "Dynamically allocated" option by clicking the "Next" button.
Accept the default location and set the size to "30G", then click the "Create" button. If you can spread the virtual disks onto different physical disks, that will improve performance.
The "ol5-112-rac1" VM will appear on the left hand pane. Scroll down the "Details" tab on the right and click on the "Network" link.
Make sure "Adapter 1" is enabled, set to "Bridged Adapter", then click on the "Adapter 2" tab.
Make sure "Adapter 2" is enabled, set to "Bridged Adapter" or "Internal Network", then click on
the "System" section.
Move "Hard Disk" to the top of the boot order and uncheck the "Floppy" option, then click the
The virtual machine is now configured so we can start the guest operating system installation. Guest Operating System Installation
With the new VM highlighted, click the "Start" button on the toolbar. On the "Select start-updisk" screen, choose the relevant Oracle Linux ISO image and click the "Start" button.
The resulting console window will contain the Oracle Linux boot screen.
Continue through the Oracle Linux 5 installation as you would for a basic server. A general
pictorial guide to the installation can be found here. More specifically, it should be a server installation with a minimum of 4G+ swap, firewall disabled, SELinux set to permissive and the
following package groups installed:
; Desktop Environments > GNOME Desktop Environment
; Applications > Editors
; Applications > Graphical Internet
; Development > Development Libraries
; Development > Development Tools
; Servers > Server Configuration Tools
; Base System > Administration Tools
; Base System > Base
; Base System > System Tools
; Base System > X Window System
To be consistent with the rest of the article, the following information should be set during the
; hostname: ol5-112-rac1.localdomain
; IP Address eth0: 192.168.0.101 (public address)
; Default Gateway eth0: 192.168.0.1 (public address)
; IP Address eth1: 192.168.1.101 (private address)