In this post we will look into steps for installation of Oracle 11g database on Virtual Box.

We need to download Oracle 11g software for Linux from Oracle site.

The installation will be done on Oracle Virtual box having Oracle Enterprise Linux. Detailed steps for installation of Virtual Box and OEL is posted earlier. Please refer Oracle Virtual Box Installation for detailed steps.

Only we need to make sure we defined hardisk and RAM to virtual machine as per your need.

I have given 50 GB hard disk and 2 GB RAM to my virtual machine which will be used for the installation.

The layout of the file system is as below:





Once the machine is prepared will proceed with database installation and creation.

/u01 -- will be used for Oracle Home

/datatop -- will be used for datafiles


Install the pre-required rpm's  for oracle database installation using yum.This will also create a oracle OS user that will be used for installing the database.

[root@funoraclecore yum.repos.d]# mv public-yum-ol6.repo public-yum-ol6.repo_orig[root@funoraclecore yum.repos.d]# ls- ltrbash: ls-: command not found[root@funoraclecore yum.repos.d]# ls -ltrtotal 4-rw-r--r--. 1 root root 1953 Feb 24  2013 public-yum-ol6.repo_orig[root@funoraclecore yum.repos.d]# wget http://public-yum.oracle.com/public-yum-ol6.repo--2017-04-09 20:01:30--  http://public-yum.oracle.com/public-yum-ol6.repoResolving public-yum.oracle.com... 23.32.28.209, 23.32.28.208Connecting to public-yum.oracle.com|23.32.28.209|:80... connected.HTTP request sent, awaiting response... 200 OKLength: 7748 (7.6K) [text/plain]Saving to: “public-yum-ol6.repo” 100%[==============================================================================================================================>] 7,748       --.-K/s   in 0s       2017-04-09 20:01:31 (107 MB/s) - “public-yum-ol6.repo” saved [7748/7748] [root@funoraclecore yum.repos.d]# ls -ltrtotal 12-rw-r--r--. 1 root root 1953 Feb 24  2013 public-yum-ol6.repo_orig-rw-r--r--. 1 root root 7748 Apr  4 01:05 public-yum-ol6.repo[root@funoraclecore yum.repos.d]# id oracleid: oracle: No such user

[root@funoraclecore yum.repos.d]# yum install oracle-rdbms-server-11gR2-preinstallLoaded plugins: refresh-packagekit, securityol6_UEK_latest                                                                                                                                   | 1.2 kB     00:00     ^[[Bol6_UEK_latest/primary                                                40% [========================                                   ] 941 kB/s |  13 MB     00:19 ol6_UEK_latest/primary                                                                                                                           |  31 MB     00:25     ol6_UEK_latest                                                                                                                                                  659/659ol6_latest                                                                                                                                       | 1.4 kB     00:00     ol6_latest/primary                                                                                                                               |  63 MB     00:52     ol6_latest                                                                                                                                                  38729/38729Setting up Install ProcessResolving Dependencies--> Running transaction check---> Package oracle-rdbms-server-11gR2-preinstall.x86_64 0:1.0-13.el6 will be installed--> Processing Dependency: compat-libcap1 for package: oracle-rdbms-server-11gR2-preinstall-1.0-13.el6.x86_64--> Processing Dependency: ksh for package: oracle-rdbms-server-11gR2-preinstall-1.0-13.el6.x86_64--> Processing Dependency: libaio-devel for package: oracle-rdbms-server-11gR2-preinstall-1.0-13.el6.x86_64--> Processing Dependency: compat-libstdc++-33 for package: oracle-rdbms-server-11gR2-preinstall-1.0-13.el6.x86_64--> Running transaction check---> Package compat-libcap1.x86_64 0:1.10-1 will be installed---> Package compat-libstdc++-33.x86_64 0:3.2.3-69.el6 will be installed---> Package ksh.x86_64 0:20120801-33.el6 will be installed---> Package libaio-devel.x86_64 0:0.3.107-10.el6 will be installed--> Finished Dependency Resolution Dependencies Resolved ======================================================================================================================================================================== Package                                                    Arch                         Version                                 Repository                        Size========================================================================================================================================================================Installing: oracle-rdbms-server-11gR2-preinstall                       x86_64                       1.0-13.el6                              ol6_latest                        18 kInstalling for dependencies: compat-libcap1                                             x86_64                       1.10-1                                  ol6_latest                        17 k compat-libstdc++-33                                        x86_64                       3.2.3-69.el6                            ol6_latest                       183 k ksh                                                        x86_64                       20120801-33.el6                         ol6_latest                       760 k libaio-devel                                               x86_64                       0.3.107-10.el6                          ol6_latest                        13 k Transaction Summary========================================================================================================================================================================Install       5 Package(s) Total download size: 990 kInstalled size: 2.5 MIs this ok [y/N]: yIs this ok [y/N]: YDownloading Packages:(1/5): compat-libcap1-1.10-1.x86_64.rpm                                                                                                          |  17 kB     00:00     (2/5): compat-libstdc++-33-3.2.3-69.el6.x86_64.rpm                                                                                               | 183 kB     00:00     (3/5): ksh-20120801-33.el6.x86_64.rpm                                                                                                            | 760 kB     00:00     (4/5): libaio-devel-0.3.107-10.el6.x86_64.rpm                                                                                                    |  13 kB     00:00     (5/5): oracle-rdbms-server-11gR2-preinstall-1.0-13.el6.x86_64.rpm                                                                                |  18 kB     00:00     ------------------------------------------------------------------------------------------------------------------------------------------------------------------------Total                                                                                                                                   281 kB/s | 990 kB     00:03     warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEYRetrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracleImporting GPG key 0xEC551F03: Userid : Oracle OSS group (Open Source Software group) <build@oss.oracle.com> Package: 6:oraclelinux-release-6Server-4.0.4.x86_64 (@anaconda-OracleLinuxServer-201302251503.x86_64/6.4) From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-oracleIs this ok [y/N]: YRunning rpm_check_debugRunning Transaction TestTransaction Test SucceededRunning Transaction  Installing : ksh-20120801-33.el6.x86_64                                                                                                                           1/5
  Installing : libaio-devel-0.3.107-10.el6.x86_64                                                                                                                   2/5
  Installing : compat-libstdc++-33-3.2.3-69.el6.x86_64                                                                                                              3/5
  Installing : compat-libcap1-1.10-1.x86_64                                                                                                                         4/5
  Installing : oracle-rdbms-server-11gR2-preinstall-1.0-13.el6.x86_64                                                                                               5/5
  Verifying  : oracle-rdbms-server-11gR2-preinstall-1.0-13.el6.x86_64                                                                                               1/5
  Verifying  : compat-libcap1-1.10-1.x86_64                                                                                                                         2/5
  Verifying  : compat-libstdc++-33-3.2.3-69.el6.x86_64                                                                                                              3/5
  Verifying  : libaio-devel-0.3.107-10.el6.x86_64                                                                                                                   4/5
  Verifying  : ksh-20120801-33.el6.x86_64                                                                                                                           5/5
 Installed:  oracle-rdbms-server-11gR2-preinstall.x86_64 0:1.0-13.el6                                                                                                               Dependency Installed:  compat-libcap1.x86_64 0:1.10-1        compat-libstdc++-33.x86_64 0:3.2.3-69.el6        ksh.x86_64 0:20120801-33.el6        libaio-devel.x86_64 0:0.3.107-10.el6        Complete!

[root@funoraclecore yum.repos.d]# id oracleuid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba) [root@funoraclecore ~]# passwd oracleChanging password for user oracle.New password:
BAD PASSWORD: it is based on a dictionary wordRetype new password:
passwd: all authentication tokens updated successfully.

[root@funoraclecore ~]# ls -ld /media/sf_himanshu_sharedrwxrwx---. 1 root vboxsf 0 Apr  9 19:35 /media/sf_himanshu_share[root@funoraclecore ~]# usermod -G vboxsf oracle[root@funoraclecore ~]# id oracleuid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),492(vboxsf)

Changing permission of /u01 and /datatop

[root@funoraclecore Desktop]# chown oracle:oinstall /u01[root@funoraclecore Desktop]# chown oracle:oinstall /datatop[root@funoraclecore Desktop]# ls -ld /datatop /u01drwxr-xr-x. 3 oracle oinstall 4096 Apr  9 12:17 /datatopdrwxr-xr-x. 3 oracle oinstall 4096 Apr  9 12:17 /u01



The zip files that would be downloaded for oracle needs to be unzipped. Folder with data base name will be created.


Set the below environment parameter in .bash_profile file for oracle user.


TMP=/tmp; export TMPTMPDIR=$TMP; export TMPDIR ORACLE_HOSTNAME=funoraclecore.lab; export ORACLE_HOSTNAMEORACLE_BASE=/u01/oracle; export ORACLE_BASEORACLE_HOME=$ORACLE_BASE/product/11.2.0; export ORACLE_HOMEORACLE_SID=TEST12; export ORACLE_SIDPATH=$ORACLE_HOME/bin:$PATH; export PATH LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATHCLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

Go to database directory and  launch run installer and proceed with GUI installer as below.
Provide the inputs as required.






















 Select Yes and Continue



Please ignore the below errors as we have already higher version of packages installed.









Run the mentioned scripts as root user.







Once installation is completed. Please verify database.

SQL> select name,open_mode from v$database;
NAME  OPEN_MODE
--------- --------------------
TEST12  READ WRITE