logo for asktheoracle.net
leftimage for asktheoracle.net

Oracle 11g Installation and Set Up Using Oracle VirtualBox and Oracle Enterprise Linux (Stages 1-2)

Recently we decided to try out Oracle 11g on Linux. The only problem was we didn't have a spare Linux server lying about. What to do? Well we could of course have gone out and bought one, but we decided a smarter way was to build a virtual Linux environment using VirtualBox and the RedHat-compatible Oracle Enterprise Linux instead.
This is the tale of how we did it and a guide for you to follow in our footsteps.

This part covers the installation of VirtualBox and the configuration of the virtual machine (stage 1 & 2).

Part 2 covers the installation and confgiration of Linux on the virtual machine for the Oracle 11g database ( stage 3).

Part 3 covers the installation and
configuration of the Oracle 11g database in the virtual Linux environment (stage 4).

If you're new to virtualization then Oracle's VirtualBox provides a great introduction to the subject. In a nutshell, VirtualBox provides a virtual environment to enable software written for one operating system (such as Linux) - known as the guest - to run unchanged on another (such as Windows) - known as the host.

As far as the host operating system is concerned,  VirtualBox is just another application, but running within it is the guest operating system (Linux, for example) along with all the guest's processes (such as the Oracle 11g database processes) as if they were running on a real machine.

VirtualBox is not an emulator because it uses the guest operating system to run the guest applications, although it does have to emulate certain  hardware requests. For more information about virtualization and how VirtualBox works see the VirtualBox website.

In our case, we used Windows Vista as the host operating system and Oracle Enterprise Linux as the guest.

Before we allok at the details of this, just a quick word about licensing. Oracle 11g is available from the Oracle Technology Network for personal use or for trial purposes, Oracle Enterprise Linux is also available without charge unless you want support.

Let's now take a look at the trials and tribulations we had. In stage 1 we installed Virtual Box. Stage 2 was the configuration of a new virtual machine ready for stage 3, the installation of Oracle Enterprise Linux followed by stage 4, the installation of the Oracle software and configuration of the database.

Oracle Tips & Tricks to SKYROCKET Your Career!

If you're not already a subscriber to Oracle Tips and Tricks, you're  missing out on a myriad of tips and techniques to help you become a better, faster, smarter developer. Subscribe now and ignite your career.


Stage 1 - Install VirtualBox

VirtualBox is available from VirtualBox.org and is free for personal use (whether commercial or not) and for evaluation purposes.

Step 1 Download VirtualBox

On the download page you'll see links to the installation files for the (x86 and AMD64/Intel64) host operating systems: Windows, Linux, OS X and Solaris/Open Solaris.

VirtualBox virtualization software download page

For Windows, all you need to do is download the relatively small (63 Mb) "VirtualBox Setup Wizard" exe file.

Step 2 - VirtualBox Setup

Run VirtualBox Setup Wizard (the file downloaded  in step 1),  accept the license agreement, decide whether or not you want USB and networking support in your virtual environment and then VirtualBox is installed.

VirtualBox set up usb and networking

Stage 2 - Configure The Virtual Environment

Once you've installed VirtualBox, before you can do anything else you have to create and configure the virtual machine(s) which includes the allocation of resources (physical memory, disk space, peripherals) from the real machine.

Step 1 - Start VirtualBox

To start the process of configuring your virtual environment just run VirtualBox and you'll be presented with the "Welcome" screen.

Oracle VirtualBox welcome screen

Step 2 - Create a new virtual machine

Now the real fun starts - allocating physical resources to your new virtual machine.

Step 2a - Run the new virtual machine creation wizard

To start the process of creating a new virual machine, just click on the icon of the circular saw to start the "new virtual machine" wizard.

Step 2b - Name the new virtual machine and specify the guest o/s 

The 2nd page of the wizard enables you to specify the name of your virtual machine and the type of guest operating system you intend to run.

Cconfiguration of new virtual machine with VirtualBox virtualization software

The name you give to the virtual machine is just for identification.

Specifying the type of guest operating system and the particular flavour seems to be designed to help VirtualBox optimise the virtual environment. However we didn't test what happens when you specify the guest o/s as one thing and then actaully install something completely different.

Step 2c - Allocate RAM to the virtual machine 

How much RAM you allocate depends on a how big a virtual machine you need and how much physical RAM the host machine has.

Allocation of RAM to virtual machine

For Oracle 11g on Linux x86, the requirement is for a minimum of 1GB of RAM. On top of that you need some spare RAM for Linux to run so the virtual environment has to be configured to meet those requirements.

VirtualBox doesn't allow you to continue to the next step in the new virtual machine wizard if you allocate more than 50% of physical RAM to your virtual machine, although you can change settings later by clicking on the icon of the cog. In our testing, however, we found that allocating more than 50% of pysical RAM to the virtual machine adversely affected its stability so it's best to stcik to the 50% guidelines.

Step 2c - Allocate hard disk to the virtual machine 

The next stage is to specify the virtual hard disk to be used for the virtual machine. You can either use an existing or create a new one. At this point you're not configuring the size just allocating it.

Virtual Hard Disk

Step 2d - Create a new virtual disk

Assuming you selected the option to create a new disk for your virtual machine, you're taken into the "Create New Virtual Disk" wizard the first step of which is to choose between a fixed size disk or an expandable disk which will take space from the real hard disk as it is needed.

Virtual hard disk storage type

We ran into problems using an expandable disk so we stuck with a fixed size one.

Step 2e - Specify size and location of new virtual disk

This step alows you to specify the name, location and size of the virtual disk. Default values are provided for all three.

Specify size and location of virtual disk

The most important field here is the size. For Oracle 11g on Linux x86, the requirement is for a minimum of 3.5GB of disk space for the Oracle software and at least another 1.6GB of disk space for the data files plus a minimum of 1.5GB of swap space and 400MB of temp space.

On top of that you need sufficient disk space to install Linux so the virtual environment has to be configured to meet those requirements.

Our initial allocation was 8GB but we had to add more space later for the Oracle 11g data files (which in the end was a simple process but it took us a while to figure out how to do it) so make this as big as you can. 12GB should be more than enough for Linux and a starter Oracle 11g database.

This is the final step in the virtual hard disk creation. The next screen in the wizard provides a summary of the specification for your new virtual disk allowing you to go back and change paramters if required. After the virtual disk is created the new virtual machine wizard displays a summary of the characteristics of the virtual machine you're about to create and again gives you the chance to go back and change any parameters.



Looking for Oracle 11g Training?

With our partners we offer instructor-led Oracle training on or off site in the UK as well as training via the Internet. See here for Oracle training in the UK. Or contact us for details of our on-line training courses.