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.
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.
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.
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.
Create a new virtual hard disk file.
Accept the default file type.
Accept the default virtual storage option to dynamically grow the virtual disk file only as needed.
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.
VirtualBox gives you a chance to review your settings before creating the guest image.
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.
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.
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.
Installing OEL 4.6
Start the VitualBox guest and the following screen will appear. Pick the first option.
Press TAB ENTER to Skip the media test.
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.
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.
Pick a time zone for your server.
Assign a password for root.
If you are using a newly created virtual storage file it is safe to select the first option to use all space.
Pick the installation type. I choose a desktop just because I thought it would be easier for a learning machine.
Okay, time for a cup of coffee while all the packages get installed.
I just happened to capture the message above about setting the SELinux policy. We’ll change that when we get to the database setup.
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.
When it is done you should see output similar to this.
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.