Thursday, August 8, 2013

Increase VirtualBox Hard Disk (VDI) Size

1. Shutdown the VM for which you want to increase the hard disk size.
2. Make sure PATH environment variable has VirtualBox location included:
C:\Program Files\Oracle\VirtualBox
3. In the command prompt, cd to location of .vdi file for the virtual machine and execute below command (size is in MB):
VBoxManage modifyhd ocm1.vdi --resize 30720
This takes care of increasing size of vdi to 30GB.

Wednesday, August 7, 2013

Install Oracle Database 11g Enterprise Edition Release


Documentation for Oracle Database 11gR2:

Database Quick Installation Guide for Linux x86

Database Installation Guide for Linux

We will directly jump to creating OS groups and user for Database software installation.

1. OCM1 VM was configured to use DHCP for IP and hostname. It was showing localhost.localdomain as hostname.

2. I changed hostname using system-config-network and updated hostname to

3. I left DHCP for IP address assignment.

4. Create below groups for database. I am not going to create ASM related groups yet.

/usr/sbin/groupadd oinstall

/usr/sbin/groupadd -g 502 dba

/usr/sbin/groupadd -g 503 oper

5. Create software owner i.e. oracle user:

/usr/sbin/useradd -u 501 -g oinstall -G dba oracle

passwd oracle

6. Create Oracle Base Directory

as root:

# mkdir -p /u01/app/oracle

# chown -R oracle:oinstall /u01/app/oracle

# chmod -R 775 /u01/app/oracle

**added below lines because of INS-32031 and INS-32033… See details

# mkdir –p /u01/app/oraInventory

# chown –R oracle:oinstall /u01/app/oraInventory

# chmod –R 775 /u01/app/oraInventory

7. Create software staging directory

as root:

# mkdir -p /sw

# chown -R oracle:oinstall /sw

# chmod -R 775 /sw

8. Login as oracle user and download “Oracle Database 11g Enterprise Edition Release (32-bit)”

11/10/11: Patch Set for Linux, Solaris, Windows, AIX and HP-UX Itanium is now available on Note: it is a full installation (you do not need to download first).

Download patchset 10404530 

(****OLD*** I realize the initial disk allocation of 12GB would not be enough as software itself is 6GB. I currently have 4.5 GB free, so I would have to increase the hard disk size to 30GB so that I dont have to increase it so often as I will have to create a database later. Follow Increase VirtualBox Hard Disk (VDI) size )

9. unzip all the files in the same folder

10. It will generate: client, database, deinstall, examples, gateways, grid

11. Go to database and start OUI using:



1 2 3 4 5 6 7 8 9 10 11==> Fixed this ( )

12 13 14 15 16 ==> Installed all these missing packages using “yum install <packagename>”

17 18 19 20 software install is complete.

Saturday, August 3, 2013

Export Virtual Appliance

Virtual Machine OCM1 will be exported as appliance so that I can import in future for creating another virtual machine and to avoid to do all the installation again.

-Shutdown the VM OCM1

File -> Export Appliance





Create Virtual Machine “OCM” & Install Linux Guest OS

image image  

clip_image006 clip_image008

clip_image010 image  


Add two more virtual hard disks to ocm VM.

image image

image image

image image


Similarly add ocmhd3. After adding ocmhd3, you will see:


Now add additional nework adapter: We will have 2 or more network adapters for each VM.

1) One with network mode of NAT


2)Another with network mode of Host-only Adapter


This is how it will look. Check storage and network.



Download OS ISO image from:


Select below as Exam environment suggests that the lab would be running Oracle Linux 5.4 32-bit.


clip_image020 will be downloaded. Extract it. It will extract below file:


image image

Click the CD icon and provide ISO image downloaded for Linux OS.

Then click “Start” for ocm.

ocm1 ocm2 ocm3 ocm4 ocm5 ocm6 ocm7 ocm8 ocm9 ocm10 ocm11 ocm12 ocm13 ocm14

ocm1 ocm2

ocm5 ocm3 ocm4 ocm5    ocm18 ocm19 ocm20 ocm31 ocm32 ocm33   ocm36 ocm37 ocm38 ocm39 ocm40  ocm42 ocm43 ocm44 ocm45 ocm46 ocm47 ocm48 ocm49

  Few more tasks:

1. Don’t forget to install guest additions for linux to make sure higher screen resolution is available as well as some other features. Follow

2. Install oracle-validated rpm using yum install oracle-validated. Check the output here::

When it is installed, the Oracle Pre-Install RPM or Oracle Validated RPM does the following:

  • Automatically downloads and installs any additional RPM packages needed for installing Oracle Grid Infrastructure and Oracle Database, and resolves any dependencies

  • Creates an oracle user, and creates the oraInventory (oinstall) and OSDBA (dba) groups for that user

    [root@ocm ~]# id oracle
    uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba) context=root:system_r:unconfined_t:SystemLow-SystemHigh

  • As needed, sets sysctl.conf settings, system startup parameters, and driver parameters to values based on recommendations from the Oracle RDBMS Pre-Install program

  • Sets hard and soft resource limits

  • Sets other recommended parameters, depending on your kernel version

3. Modify /etc/hosts as shown below: 

[root@ocm ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.      ocm localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6

[root@ocm ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail. ocm localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6

VM OCM is ready for use.