Saturday, June 25, 2011

Installing Oracle Enterprise Linux 5 on VirtualBox 4

I will try to go over the process of installing Oracle Enterprise Linux 5 (OEL) on VirtualBox 4 (VB). My host machine is a Windows based machine.
Start the process by downloading VirtualBox 4 and OEL from Oracle's website
Start VB and click New
This will initialize a wizard which will guide you through the process of creating a new virtual machine (VM). Click next to continue.
Provide a name for your VM, here I have use OEL5 as the name and selected the Operating system to be linux and version to be Oracle.Click next to continue
On this screen we will be specifying how much memory to allocate to the VM, which will depend on what you are trying to do on this VM. I have selected 1024 MB for this VM, click next to continue.
 The next step will be to define the virtual disk drives where we will specify how we want to boot this VM. Here I have chosen to create a new hard disk which will also be the boot drive. Click next to continue.
This will launch another wizard which will guide us through the process of creating a New Virtual Disk. Click next to continue.
On this screen we have a couple of choices,
a) we let the VM allocate the space dynamically upto the size we will be specifying on the next scree or
b) we can allocate all the disk space at once.
I have chosen to go with option a. Click next to continue.

On this screen you specify where you want the virtual disk to be located (make sure you have enough free disk space on the physical disk where this file will be located), and the size of the virtual disk (I have allocated 10GB). Click next to continue.

This screen summarizes the options chosen to create the virtual disk, click next to continue.
This screen summarizes the settings chosen for creating the virtual machine.Click finish to complete the creation of the VM.

This screen shows the new VM we just created in VB's console
 Now we will tweak some of the settings for the VM like removing the floppy drive,
Select the VM and click on setttings.
Select System from the left settings menu and uncheck Floppy
 and move it below Hard Disk using the arrows on the right.Also check Enable IO APIC (more on why later)


Next select Storage and click on Empty this will show all the properties for this item on the right pane.Here you click on the CD/DVD selection drop list and point it to the Enterprise Linux iso file you got from Oracle. This is a single iso file which contains the complete Linux distribution. The reason we do this now is so that when we start the VM upon bootup it will use this file to boot and start the installation of OEL.
Next select Network from the left pane and change the Networking from NAT to Bridged Adapter.

If you want to access files from the host machine you can accomplish this by setting up Shared Folders.
Click on Shared Folders and point to the directory you want to access from your guest machine (OEL in our case). I have a folder called software on the D drive that I want to expose to my linux guest VM as share.
Once completed it will show up as follows

Now that we have tweaked our VM we are ready to install the operating system (OEL in our case). Highlight the VM and click start to "turn on" the VM.

This will now show us the Enterprise Linux screen. Remember earlier we had selected an iso image of this distribution in our CD/DVD properties. This is similar to booting a machine with a CD/DVD disc. Press ENTER to start the install process in graphical mode.
The next screen gives the opportunity to verify the "disk" (make sure it is free of errors), I selectet Skip using the tab key and press ENTER.
An information box will pop up you can ignore this and click OK to continue
Now you will see the OEL main screen, click next to continue.

When you click inside the VM another information box will popup telling you that the VM is going to take control of your mouse. If you want to "release" your mouse from the VM press the Right-Ctrl key on your keypad (this is the default and can be changed) and your mouse will not be under the control of the VM. lateron we will install some addons which will make this issue go away and let your mouse move freely between your VM and host machine.
Click ok to continue.
Select the language and click next to continue.
Select the keyboard - US English, click next to continue.
The next screen will show a warning about formatting the hard drive. This is a valid option since when we created a virtual harddisk we did not initialize/format it. This message is telling us that it is going to initialize the virtual hard disk by creating new partitions for Linux to be installed on.
Click Yes to continue.
This screen allow us to manually define the partitions or keep the defaults as chosen by the installer. I keep the default partitions and click Next to continue.
You will see another warning, click Yes to continue.
The next screen show information about networking. The options show here allow you to specify a name for your machine and also assign a static IP. Click on Edit

I selected manual configuration and specified a static IP address. This is so that I can SSH to the server with the same IP address. I also disabled IPv6 support as there is no need for it in my environment.
Click OK to continue.
Here I set the hostname of my VM to oel5.mydomain.com and provided settings for gateway and DNS to point to my home router.
Click Next to continue
On the next scren you define your time zone and click Next to continue
On the next screen select a passoword for the root (administrator) user. Click Next to continue.
Here on this screen you get the option to customize the software that gets installed on your server. I decided to add some compilers, libraries and system tools as I will be installing a database in later on, so I chose customize now. It is not necessary to do this if you do not need the additional tools.
Click Next to continue.

I deselected Games, Graphics and Office/Productivity under Applications
Under Development I selected Development Libraries and Legacy Software Development
Under Base System I deselected Dialup Networking Support and selected System Tools.
Click Next to continue.
Once all the selections are completed the installer check for any package dependencies and selects them as part of the installations.
Once complete it show the installation start page and provide the location (/root/install.log) where the installation log will be located.
Click Next to continue.
You will notice a couple of screens flash by which will show the formatting of the file system
before showing the installation screen. This will take anywhere between 15 -30 minutes depending on what was selected.
Once the software is installed you will see a installation complete screen. Do not click reboot yet go to the next step.
Before clicking on reboot unmount the iso image we attached to do the install (this is similar to removing a CD from the CD/DVD drive on a physical machine).
Click on Devices and choose the option to Remove disk from virtual drive. Then click Reboot.
You will see the boot up screen.
and the switch the graphical boot screen
Now since this is the first time it will take us to a wizard which will guide us through the process of setting up the firewall, sound, date/time and creating a regular user.
Click Forward to continue.
Agree to the Licence Agreement and click Forward
You can allow certain programs to pass through the firewall, by default SSH is enabled you can choose other services if necessary or completely disable the firewall if all you want is to test this on your local LAN.
Click Forward to continue.
The next screen has settings for SELinux, you can leave the default setting at Enforcing and click forward to continue.
On the next screen you have the option to enable Kdump which will capture information if the system crashes. leave the default as unchecked and click Forward to continue.
The next step allow us to setup the date and time. I like to use NTP (network time protocol) so I enabled it by going to the Network Time Protocol tab and enabling it.
Click forward to continue.
The next scree allows you to create a regular user. I created a user called oracle and gave a password. Click Forward to continue.
The next screen set up you sound. The installer detects your sound card and it should work. You can test this by clicking on the play button and making sure you are able to hear sound through your speakers.
Click Forward to continue.
The last screen gives you the option to install any additional CD's. Click Finish to complete the initial setup.
The user login screen will be shown and you can log in using the username you created earlier in this step.
Congratulation you have a working instance of Enterprise Linux 5 running under VirtualBox.

Installing Guest Additions to the VM

No comments:

Post a Comment