How to Install OEL 6.4 as a VitualBox Guest

Do you have much study time available at your job? Too often general research time is a luxury unless it is required for your current project. The best chance for me to expand my knowledge of spatial beyond what I’m already using at work is at home.

This weekend I set out to build a test platform at home using Oracle 11g. I already had a development machine running Linux Mint, but I decided that I would use OEL 6.4 (Oracle Enterprise Linux) instead to reduce the chance of OS incompatibilities with 11g. I re-imaged my computer with OEL but soon discovered that OEL is a better server OS than it is a desktop OS. For starters, my favorite web browser, Chrome, doesn’t currently work on OEL 6.4.

That made me switch to Ubuntu 12.04 as my base OS, with Oracle Enterprise Linux running as a guest under Oracle VirtualBox. Virtualization has the advantage of supporting  multiple database versions, which will come in handy when Oracle 12c is released. It also allows me to support other images as needed, like PostGIS running under Centos 6.4, as pictured below.

SpatialLab

I created custom partitions for the Ubuntu installation, in part because my machine has two drives, a 160 GB boot drive and a 500 GB storage drive, and in part to be able to preserve and reuse my /home and /usr/local partitions from one Linux installation to the next.

I created the swap, /usr/local, and root partition on the boot drive.

 Mount

 Approximate Partition Size

 /swap

 8 GB

 /usr/local

 5 GB

 /

 147 GB

I allocated the entire second drive to /home because that is where VirtualBox stores virtual storage files. In other words, the OEL 6.4 image, and any other OS images that I create will be stored under the /home directory.

 Mount

 ApproximatePartition Size

 /home

 500 GB

VirtualBox is available as a free download from the Ubuntu Software Center as pictured here.

VirtualBox

Launch VirtualBox and click New. VitualBox was smart enough to default the OS to Linux and the version to Oracle as soon as I typed “OEL” in the name.

vm2

Assign memory to the virtual machine. The minimum memory is 1 GB, but 2 GB is recommended. OEL 6.4 requires a minimum of 1 GB of memory. I gave the OEL Guest 2 GB of memory.

vm3

Create a new virtual hard disk file.

vm4

Accept the default file type.

vm5

Accept the default virtual storage option to dynamically grow the virtual disk file only as needed.

vm6

Oracle Database EE requires about 5 GB of storage. Since this database is just for learning purposes it will never house much data. I decided to give the OEL 6.4 guest image a maximum of 40 GB, allocated only as needed. That gives me plenty of physical disk space for multiple image snapshots, database versions, and other operating system images.

Virtual dist file location and size

VirtualBox gives you a chance to review your settings before creating the guest image.

Summary

After creating the OEL guest I opened Network setting and changed the “Attached to” setting to Bridged Adapter. This allowed me to configure my  firewall’s DHCP server to assign a static IP address to OEL using its MAC address. At this point, I also edited the MAC address assigned to the guest to match one setup on my firewall during a previous install this weekend.

Bridged Network Connection

Bridged Network Connection

Here is an example of the setting on my firewall’s DHCP server to assign static IP 192.168.1.39 to MAC address 08:00:27:A8:CA:DC. The OEL NIC is setup as DHCP but always gets the same IP address.

Static IP Settings

Static IP Settings

All that remains is to mount the OEL 6.4 ISO images. The smaller image is the boot disk. The 3.5 GB image contains the installation source. Simply attach both ISO images to the IDE Controller. Ignore the black box that says “SATA Controller.” I didn’t mean to capture that in the screen shot.

Screenshot from 2013-05-30 14:56:43

Installing OEL 4.6

Start the VitualBox guest and the following screen will appear. Pick the first option.

oel1

Press TAB ENTER to Skip the media test.

oel2

The installer will detect the second mounted ISO image and the installation will continue.

On the next couple of screens, not shown, choose a language for the installation process and choose a keyboard type for the system.

Select the device type for the installation.

oel4

There are two important setting on the next page. Assign a hosts name for the virtual machine, and then click the Configure Network button to edit eth0. You’ll want to select Connect automatically.

hostname

Pick a time zone for your server.

oel7

Assign a password for root.

oel8

If you are using a newly created virtual storage file it is safe to select the first option to use all space.

Use all space

Pick the installation type. I choose a desktop just because I thought it would be easier for a learning machine.

defaultinstallation

Okay, time for a cup of coffee while all the packages get installed.

oel11

I just happened to capture the message above about setting the SELinux policy. We’ll change that when we get to the database setup.

Complete

You successfully installed an OEL 6.4 guest on Oracle VirtualBox.

Install Guest Additions

You are not done yet, that is if you want the convenience of a shared clipboard, shared folders, and quality display settings. To get those things you need install VBox Additions. Start the OEL 6.4 guest and hover over the guest window’s toolbar to get the VirtualBox menu to appear at the top of the Ubuntu desktop. Move the mouse over the VirtualBox Devices menu and then go to the Install Guest Additions sub-menu. Follow the prompts and VirtualBox will mount a VBOX Additions ISO image on the OEL desktop.

Sign into your guest and switch to the root user. Before you can run the installation you need to install the following packages in OEL 6.4.

# yum update
# yum install kernel* dkms gcc
# reboot

Now you can double-click on the VirtualBox Additions CD-ROM image on the OEL desktop.

autorun

When it is done you should see output similar to this.

vboxadd3

You can verify the Virtualbox Guest Additions by copying something to the clipboard in Ubuntu and pasting it in OEL. Likewise, if you option the VirtualBox guest settings  and define a shared folder the with the auto-mount option, then in OEL you should now find the shared folder mounted under the /shared/media directory.

In my next post, we’ll install Oracle Database Enterprise Edition on our OEL 6.4 guest.

Advertisements

Diving Deeper into Oracle Spatial and Graph

Recently I attended the 2013 Location Intelligence and Oracle Spatial and Graph Users Conference in Washington, D.C. Compared with the Google I/O, JavaOne and LotusSphere conferences that I have attended in the past this was tiny, a couple of hundred attendees instead of thousands. It was similar in size to a WebSphere Portal conference I attended in Baltimore. The small size affords greater access to experts and fosters an openness in the sessions not found at mega-conferences. It’s a much better experience, in my opinion.

I’ve been working with Oracle Spatial at Garmin, where I work as a software engineer on the Garmin Connect website. Garmin Connect is part of the Fitness division and is a repository for GPS data uploaded from the users’ fitness devices for running, cycling, and swimming. Below is an example of a Connect page used to plan routes. In this example, I was planning a run during my stay in Washington, D.C. I used the heat map overlay to find a route frequented by other runners. This is helpful when you are running or biking in an unfamiliar area. This is just one example of how Connect presents geospatial information to our users.

Course Creator with heat maps turned on.

Course Creator with heat maps turned on.

The Location Intelligence and Oracle Spatial and Graph Users Conference showed me how many more features exist in Oracle Spatial and Graph that we are not taking advantage of today. I came home determined to expand my knowledge of Oracle Spatial and Graph and to find new ways to leverage this exciting technology at Garmin.

This blog is my personal journal to look back upon to help me remember what I’ve learned along the way. Perhaps it will prove helpful to others on a similar path.