Wednesday, October 28, 2015

Oracle 12c database installation on CentOS 6.5 Vagrant

Project Oracle12c database


As a non-Oracle DBA having minimum knowledge, started working on this project for installation of Oracle 12c Database on my personal laptop which have Windows 8.1 platform. Using this automation with Vagrant and Puppet provisioning on CentOS box it would be fantastic guest and on top of it running the Oracle 12c database will be hosted that's simple learning goal for today.

Virtual box requirements for Oracle 12c Database

Assume that latest version of Vagrant installed on your machine. I'm running on Vagrant 1.7.1. And also expecting Oracle VirtualBox installed on your machine.

First get the Oracle database binaries from OTN Select Enterprise Edition or Standard Edition
Database download link [This may change for next version]

Selecting Oracle 12c Database download from OTN

Get the Vagrant setup from ora12base with clone command :


 
 git clone https://github.com/dgapitts/ora12base

git clone command for ora12base

Change the Vagrantfile


This vagrantfile is very small but few changes which makes you happy.
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure(2) do |config|
config.vm.define "db12012" , primary: true do |config|
  config.vm.box = "centos-6.5-x86_64"
  config.vm.box_url = "https://dl.dropboxusercontent.com/s/np39xdpw05wfmv4/centos-6.5-x86_64.box"
  config.vm.network "private_network", ip: "192.168.33.17"
  config.vm.host_name = "ora12c66.vybhavatechnologies.com"
  config.vm.provider "virtualbox" do |vb|
    vb.memory = "4028"
  end
  config.vm.provision :shell, :path => "provision.sh"
end
end


Some of the values changed as per my needs.

  • box definition
  • box url changed because I have centos-6.5-x86_64.box already in my machine
  • host_name included vybhava :)
  • public didnot work on my windows so changed to private_network



Now bring up the centOS box for Oracle DB installation.

 F:\workspace-wls\ora12base>vagrant up
Bringing machine 'db12012' up with 'virtualbox' provider...
==> db12012: Importing base box 'centos-6.5-x86_64'...
==> db12012: Matching MAC address for NAT networking...
==> db12012: Setting the name of the VM: ora12base_db12012_1445954494958_81978
==> db12012: Clearing any previously set network interfaces...
==> db12012: Preparing network interfaces based on configuration...
    db12012: Adapter 1: nat
    db12012: Adapter 2: bridged
==> db12012: Forwarding ports...
    db12012: 22 => 2222 (adapter 1)
==> db12012: Running 'pre-boot' VM customizations...
==> db12012: Booting VM...
==> db12012: Waiting for machine to boot. This may take a few minutes...
    db12012: SSH address: 127.0.0.1:2222
    db12012: SSH username: vagrant
    db12012: SSH auth method: private key
    db12012: Warning: Connection timeout. Retrying...
    db12012: Warning: Connection timeout. Retrying...
    db12012:
    db12012: Vagrant insecure key detected. Vagrant will automatically replace
    db12012: this with a newly generated keypair for better security.
    db12012:
    db12012: Inserting generated public key within guest...
    db12012: Removing insecure key from the guest if its present...
    db12012: Key inserted! Disconnecting and reconnecting using new SSH key...
==> db12012: Machine booted and ready!
GuestAdditions versions on your host (4.3.30) and guest (4.3.20) do not match.
Loaded plugins: fastestmirror, security
Determining fastest mirrors
 * base: centos.excellmedia.net
 * extras: centos.excellmedia.net
 * updates: centos.excellmedia.net
Setting up Install Process
Package 1:make-3.81-20.el6.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package gcc.x86_64 0:4.4.7-4.el6 will be updated
--> Processing Dependency: gcc = 4.4.7-4.el6 for package: gcc-gfortran-4.4.7-4.el6.x86_64
--> Processing Dependency: gcc = 4.4.7-4.el6 for package: gcc-c++-4.4.7-4.el6.x86_64
---> Package gcc.x86_64 0:4.4.7-16.el6 will be an update
--> Processing Dependency: libgomp = 4.4.7-16.el6 for package: gcc-4.4.7-16.el6.x86_64
--> Processing Dependency: cpp = 4.4.7-16.el6 for package: gcc-4.4.7-16.el6.x86_64
--> Processing Dependency: libgcc >= 4.4.7-16.el6 for package: gcc-4.4.7-16.el6.x86_64
---> Package perl.x86_64 4:5.10.1-136.el6 will be updated
--> Processing Dependency: perl = 4:5.10.1-136.el6 for package: perl-IO-Compress-Zlib-2.021-136.el6.x86_64
--> Processing Dependency: perl = 4:5.10.1-136.el6 for package: 1:perl-Pod-Simple-3.13-136.el6.x86_64
--> Processing Dependency: perl = 4:5.10.1-136.el6 for package: 3:perl-version-0.77-136.el6.x86_64
--> Processing Dependency: perl = 4:5.10.1-136.el6 for package: 1:perl-Module-Pluggable-3.90-136.el6.x86_64
--> Processing Dependency: perl = 4:5.10.1-136.el6 for package: perl-Compress-Zlib-2.021-136.el6.x86_64
--> Processing Dependency: perl = 4:5.10.1-136.el6 for package: perl-IO-Compress-Base-2.021-136.el6.x86_64
--> Processing Dependency: perl = 4:5.10.1-136.el6 for package: 1:perl-Compress-Raw-Zlib-2.021-136.el6.x86_64
--> Processing Dependency: perl = 4:5.10.1-136.el6 for package: 1:perl-Pod-Escapes-1.04-136.el6.x86_64
--> Processing Dependency: perl = 4:5.10.1-136.el6 for package: 4:perl-libs-5.10.1-136.el6.x86_64
---> Package perl.x86_64 4:5.10.1-141.el6 will be an update
--> Running transaction check
---> Package cpp.x86_64 0:4.4.7-4.el6 will be updated
---> Package cpp.x86_64 0:4.4.7-16.el6 will be an update
---> Package gcc-c++.x86_64 0:4.4.7-4.el6 will be updated
---> Package gcc-c++.x86_64 0:4.4.7-16.el6 will be an update
--> Processing Dependency: libstdc++-devel = 4.4.7-16.el6 for package: gcc-c++-4.4.7-16.el6.x86_64
--> Processing Dependency: libstdc++ = 4.4.7-16.el6 for package: gcc-c++-4.4.7-16.el6.x86_64
---> Package gcc-gfortran.x86_64 0:4.4.7-4.el6 will be updated
---> Package gcc-gfortran.x86_64 0:4.4.7-16.el6 will be an update
--> Processing Dependency: libgfortran = 4.4.7-16.el6 for package: gcc-gfortran-4.4.7-16.el6.x86_64
---> Package libgcc.x86_64 0:4.4.7-4.el6 will be updated
---> Package libgcc.x86_64 0:4.4.7-16.el6 will be an update
---> Package libgomp.x86_64 0:4.4.7-4.el6 will be updated
---> Package libgomp.x86_64 0:4.4.7-16.el6 will be an update
---> Package perl-Compress-Raw-Zlib.x86_64 1:2.021-136.el6 will be updated
---> Package perl-Compress-Raw-Zlib.x86_64 1:2.021-141.el6 will be an update
---> Package perl-Compress-Zlib.x86_64 0:2.021-136.el6 will be updated
---> Package perl-Compress-Zlib.x86_64 0:2.021-141.el6 will be an update
---> Package perl-IO-Compress-Base.x86_64 0:2.021-136.el6 will be updated
---> Package perl-IO-Compress-Base.x86_64 0:2.021-141.el6 will be an update
---> Package perl-IO-Compress-Zlib.x86_64 0:2.021-136.el6 will be updated
---> Package perl-IO-Compress-Zlib.x86_64 0:2.021-141.el6 will be an update
---> Package perl-Module-Pluggable.x86_64 1:3.90-136.el6 will be updated
---> Package perl-Module-Pluggable.x86_64 1:3.90-141.el6 will be an update
---> Package perl-Pod-Escapes.x86_64 1:1.04-136.el6 will be updated
---> Package perl-Pod-Escapes.x86_64 1:1.04-141.el6 will be an update
---> Package perl-Pod-Simple.x86_64 1:3.13-136.el6 will be updated
---> Package perl-Pod-Simple.x86_64 1:3.13-141.el6 will be an update
---> Package perl-libs.x86_64 4:5.10.1-136.el6 will be updated
---> Package perl-libs.x86_64 4:5.10.1-141.el6 will be an update
---> Package perl-version.x86_64 3:0.77-136.el6 will be updated
---> Package perl-version.x86_64 3:0.77-141.el6 will be an update
--> Running transaction check
---> Package libgfortran.x86_64 0:4.4.7-4.el6 will be updated
---> Package libgfortran.x86_64 0:4.4.7-16.el6 will be an update
---> Package libstdc++.x86_64 0:4.4.7-4.el6 will be updated
---> Package libstdc++.x86_64 0:4.4.7-16.el6 will be an update
---> Package libstdc++-devel.x86_64 0:4.4.7-4.el6 will be updated
---> Package libstdc++-devel.x86_64 0:4.4.7-16.el6 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                     Arch        Version                Repository
                                                                           Size
================================================================================
Updating:
 gcc                         x86_64      4.4.7-16.el6           base       10 M
 perl                        x86_64      4:5.10.1-141.el6       base       10 M
Updating for dependencies:
 cpp                         x86_64      4.4.7-16.el6           base      3.7 M
 gcc-c++                     x86_64      4.4.7-16.el6           base      4.7 M
 gcc-gfortran                x86_64      4.4.7-16.el6           base      4.7 M
 libgcc                      x86_64      4.4.7-16.el6           base      103 k
 libgfortran                 x86_64      4.4.7-16.el6           base      267 k
 libgomp                     x86_64      4.4.7-16.el6           base      134 k
 libstdc++                   x86_64      4.4.7-16.el6           base      295 k
 libstdc++-devel             x86_64      4.4.7-16.el6           base      1.6 M
 perl-Compress-Raw-Zlib      x86_64      1:2.021-141.el6        base       70 k
 perl-Compress-Zlib          x86_64      2.021-141.el6          base       46 k
 perl-IO-Compress-Base       x86_64      2.021-141.el6          base       70 k
 perl-IO-Compress-Zlib       x86_64      2.021-141.el6          base      136 k
 perl-Module-Pluggable       x86_64      1:3.90-141.el6         base       40 k
 perl-Pod-Escapes            x86_64      1:1.04-141.el6         base       33 k
 perl-Pod-Simple             x86_64      1:3.13-141.el6         base      213 k
 perl-libs                   x86_64      4:5.10.1-141.el6       base      578 k
 perl-version                x86_64      3:0.77-141.el6         base       52 k

Transaction Summary
================================================================================
Upgrade      19 Package(s)

Total download size: 37 M
Downloading Packages:
http://centos.excellmedia.net/6.7/os/x86_64/Packages/gcc-c%2B%2B-4.4.7-16.el6.x86_64.rpm: [Errno 12] Timeout on http://centos.excellmedia.net/6.7
/os/x86_64/Packages/gcc-c%2B%2B-4.4.7-16.el6.x86_64.rpm: (28, 'Operation too slow. Less than 1 bytes/sec transfered the last 30 seconds')
Trying other mirror.
--------------------------------------------------------------------------------
Total                                           554 kB/s |  37 MB     01:08
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : libgcc-4.4.7-16.el6.x86_64                                  1/38
  Updating   : libstdc++-4.4.7-16.el6.x86_64                               2/38
  Updating   : libstdc++-devel-4.4.7-16.el6.x86_64                         3/38
  Updating   : 1:perl-Pod-Escapes-1.04-141.el6.x86_64                      4/38
  Updating   : 4:perl-libs-5.10.1-141.el6.x86_64                           5/38
  Updating   : 1:perl-Pod-Simple-3.13-141.el6.x86_64                       6/38
  Updating   : 1:perl-Module-Pluggable-3.90-141.el6.x86_64                 7/38
  Updating   : 3:perl-version-0.77-141.el6.x86_64                          8/38
  Updating   : 4:perl-5.10.1-141.el6.x86_64                                9/38
  Updating   : 1:perl-Compress-Raw-Zlib-2.021-141.el6.x86_64              10/38
  Updating   : perl-IO-Compress-Base-2.021-141.el6.x86_64                 11/38
  Updating   : perl-IO-Compress-Zlib-2.021-141.el6.x86_64                 12/38
  Updating   : cpp-4.4.7-16.el6.x86_64                                    13/38
  Updating   : libgfortran-4.4.7-16.el6.x86_64                            14/38
  Updating   : libgomp-4.4.7-16.el6.x86_64                                15/38
  Updating   : gcc-4.4.7-16.el6.x86_64                                    16/38
  Updating   : gcc-c++-4.4.7-16.el6.x86_64                                17/38
  Updating   : gcc-gfortran-4.4.7-16.el6.x86_64                           18/38
  Updating   : perl-Compress-Zlib-2.021-141.el6.x86_64                    19/38
  Cleanup    : perl-Compress-Zlib-2.021-136.el6.x86_64                    20/38
  Cleanup    : perl-IO-Compress-Zlib-2.021-136.el6.x86_64                 21/38
  Cleanup    : gcc-c++-4.4.7-4.el6.x86_64                                 22/38
  Cleanup    : gcc-gfortran-4.4.7-4.el6.x86_64                            23/38
  Cleanup    : libstdc++-devel-4.4.7-4.el6.x86_64                         24/38
  Cleanup    : perl-IO-Compress-Base-2.021-136.el6.x86_64                 25/38
  Cleanup    : gcc-4.4.7-4.el6.x86_64                                     26/38
  Cleanup    : libstdc++-4.4.7-4.el6.x86_64                               27/38
  Cleanup    : 1:perl-Compress-Raw-Zlib-2.021-136.el6.x86_64              28/38
  Cleanup    : 1:perl-Module-Pluggable-3.90-136.el6.x86_64                29/38
  Cleanup    : 1:perl-Pod-Escapes-1.04-136.el6.x86_64                     30/38
  Cleanup    : 1:perl-Pod-Simple-3.13-136.el6.x86_64                      31/38
  Cleanup    : 4:perl-libs-5.10.1-136.el6.x86_64                          32/38
  Cleanup    : 4:perl-5.10.1-136.el6.x86_64                               33/38
  Cleanup    : 3:perl-version-0.77-136.el6.x86_64                         34/38
  Cleanup    : libgcc-4.4.7-4.el6.x86_64                                  35/38
  Cleanup    : cpp-4.4.7-4.el6.x86_64                                     36/38
  Cleanup    : libgomp-4.4.7-4.el6.x86_64                                 37/38
  Cleanup    : libgfortran-4.4.7-4.el6.x86_64                             38/38
  Verifying  : libgomp-4.4.7-16.el6.x86_64                                 1/38
  Verifying  : libgfortran-4.4.7-16.el6.x86_64                             2/38
  Verifying  : gcc-c++-4.4.7-16.el6.x86_64                                 3/38
  Verifying  : 3:perl-version-0.77-141.el6.x86_64                          4/38
  Verifying  : 1:perl-Pod-Escapes-1.04-141.el6.x86_64                      5/38
  Verifying  : gcc-gfortran-4.4.7-16.el6.x86_64                            6/38
  Verifying  : 4:perl-libs-5.10.1-141.el6.x86_64                           7/38
  Verifying  : libstdc++-4.4.7-16.el6.x86_64                               8/38
  Verifying  : 1:perl-Pod-Simple-3.13-141.el6.x86_64                       9/38
  Verifying  : cpp-4.4.7-16.el6.x86_64                                    10/38
  Verifying  : libgcc-4.4.7-16.el6.x86_64                                 11/38
  Verifying  : gcc-4.4.7-16.el6.x86_64                                    12/38
  Verifying  : 1:perl-Module-Pluggable-3.90-141.el6.x86_64                13/38
  Verifying  : 4:perl-5.10.1-141.el6.x86_64                               14/38
  Verifying  : 1:perl-Compress-Raw-Zlib-2.021-141.el6.x86_64              15/38
  Verifying  : perl-IO-Compress-Zlib-2.021-141.el6.x86_64                 16/38
  Verifying  : perl-IO-Compress-Base-2.021-141.el6.x86_64                 17/38
  Verifying  : perl-Compress-Zlib-2.021-141.el6.x86_64                    18/38
  Verifying  : libstdc++-devel-4.4.7-16.el6.x86_64                        19/38
  Verifying  : 1:perl-Module-Pluggable-3.90-136.el6.x86_64                20/38
  Verifying  : gcc-gfortran-4.4.7-4.el6.x86_64                            21/38
  Verifying  : 4:perl-5.10.1-136.el6.x86_64                               22/38
  Verifying  : perl-Compress-Zlib-2.021-136.el6.x86_64                    23/38
  Verifying  : 1:perl-Compress-Raw-Zlib-2.021-136.el6.x86_64              24/38
  Verifying  : 4:perl-libs-5.10.1-136.el6.x86_64                          25/38
  Verifying  : libstdc++-4.4.7-4.el6.x86_64                               26/38
  Verifying  : libstdc++-devel-4.4.7-4.el6.x86_64                         27/38
  Verifying  : cpp-4.4.7-4.el6.x86_64                                     28/38
  Verifying  : 1:perl-Pod-Simple-3.13-136.el6.x86_64                      29/38
  Verifying  : perl-IO-Compress-Zlib-2.021-136.el6.x86_64                 30/38
  Verifying  : libgfortran-4.4.7-4.el6.x86_64                             31/38
  Verifying  : gcc-c++-4.4.7-4.el6.x86_64                                 32/38
  Verifying  : perl-IO-Compress-Base-2.021-136.el6.x86_64                 33/38
  Verifying  : libgomp-4.4.7-4.el6.x86_64                                 34/38
  Verifying  : gcc-4.4.7-4.el6.x86_64                                     35/38
  Verifying  : 3:perl-version-0.77-136.el6.x86_64                         36/38
  Verifying  : 1:perl-Pod-Escapes-1.04-136.el6.x86_64                     37/38
  Verifying  : libgcc-4.4.7-4.el6.x86_64                                  38/38

Updated:
  gcc.x86_64 0:4.4.7-16.el6             perl.x86_64 4:5.10.1-141.el6

Dependency Updated:
  cpp.x86_64 0:4.4.7-16.el6
  gcc-c++.x86_64 0:4.4.7-16.el6
  gcc-gfortran.x86_64 0:4.4.7-16.el6
  libgcc.x86_64 0:4.4.7-16.el6
  libgfortran.x86_64 0:4.4.7-16.el6
  libgomp.x86_64 0:4.4.7-16.el6
  libstdc++.x86_64 0:4.4.7-16.el6
  libstdc++-devel.x86_64 0:4.4.7-16.el6
  perl-Compress-Raw-Zlib.x86_64 1:2.021-141.el6
  perl-Compress-Zlib.x86_64 0:2.021-141.el6
  perl-IO-Compress-Base.x86_64 0:2.021-141.el6
  perl-IO-Compress-Zlib.x86_64 0:2.021-141.el6
  perl-Module-Pluggable.x86_64 1:3.90-141.el6
  perl-Pod-Escapes.x86_64 1:1.04-141.el6
  perl-Pod-Simple.x86_64 1:3.13-141.el6
  perl-libs.x86_64 4:5.10.1-141.el6
  perl-version.x86_64 3:0.77-141.el6

Complete!
Copy iso file F:\Oracle\VBox\VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.iso
Installing Virtualbox Guest Additions 4.3.30 - guest version is 4.3.20
Verifying archive integrity... All good.
Uncompressing VirtualBox 4.3.30 Guest Additions for Linux............
VirtualBox Guest Additions installer
Removing installed version 4.3.20 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
Removing existing VirtualBox non-DKMS kernel modules[  OK  ]
Building the VirtualBox Guest Additions kernel modules
Building the main Guest Additions module[  OK  ]
Building the shared folder support module[  OK  ]
Building the OpenGL support module[  OK  ]
Doing non-kernel setup of the Guest Additions[  OK  ]
You should restart your guest to make sure the new modules are actually used

Installing the Window System drivers
Could not find the X.Org or XFree86 Window System, skipping.
An error occurred during installation of VirtualBox Guest Additions 4.3.30. Some functionality may not work as intended.
In most cases it is OK that the "Window System drivers" installation failed.
==> db12012: Checking for guest additions in VM...
==> db12012: Setting hostname...
==> db12012: Configuring and enabling network interfaces...
==> db12012: Mounting shared folders...
    db12012: /vagrant => F:/workspace-wls/ora12base
==> db12012: Running provisioner: shell...
    db12012: Running: C:/Users/Raghav/AppData/Local/Temp/vagrant-shell20151027-1124-8muref.sh
==> db12012: ADD EXTRA ALIAS VIA .bashrc
==> db12012: INSTALL VIM
==> db12012: Loaded plugins: fastestmirror, security
==> db12012: Loading mirror speeds from cached hostfile
==> db12012:  * base: centos.excellmedia.net
==> db12012:  * extras: centos.excellmedia.net
==> db12012:  * updates: centos.excellmedia.net
==> db12012: Setting up Install Process
==> db12012: Resolving Dependencies
==> db12012: --> Running transaction check
==> db12012: ---> Package vim-enhanced.x86_64 2:7.2.411-1.8.el6 will be updated
==> db12012: ---> Package vim-enhanced.x86_64 2:7.4.629-5.el6 will be an update
==> db12012: --> Processing Dependency: vim-common = 2:7.4.629-5.el6 for package: 2:vim-enhanced-7.4.629-5.el6.x86_64
==> db12012: --> Running transaction check
==> db12012: ---> Package vim-common.x86_64 2:7.2.411-1.8.el6 will be updated
==> db12012: ---> Package vim-common.x86_64 2:7.4.629-5.el6 will be an update
==> db12012: --> Processing Dependency: vim-filesystem for package: 2:vim-common-7.4.629-5.el6.x86_64
==> db12012: --> Running transaction check
==> db12012: ---> Package vim-filesystem.x86_64 2:7.4.629-5.el6 will be installed
==> db12012: --> Finished Dependency Resolution
==> db12012:
==> db12012: Dependencies Resolved
==> db12012:
==> db12012: ================================================================================
==> db12012:  Package               Arch          Version                  Repository   Size
==> db12012: ================================================================================
==> db12012: Updating:
==> db12012:  vim-enhanced          x86_64        2:7.4.629-5.el6          base        1.0 M
==> db12012: Installing for dependencies:
==> db12012:  vim-filesystem        x86_64        2:7.4.629-5.el6          base         15 k
==> db12012: Updating for dependencies:
==> db12012:  vim-common            x86_64        2:7.4.629-5.el6          base        6.7 M
==> db12012:
==> db12012: Transaction Summary
==> db12012: ================================================================================
==> db12012: Install       1 Package(s)
==> db12012: Upgrade       2 Package(s)
==> db12012: Total download size: 7.8 M
==> db12012: Downloading Packages:
==> db12012: http://centos.excellmedia.net/6.7/os/x86_64/Packages/vim-filesystem-7.4.629-5.el6.x86_64.rpm: [Errno 12] Timeout on http://centos.ex
cellmedia.net/6.7/os/x86_64/Packages/vim-filesystem-7.4.629-5.el6.x86_64.rpm: (28, 'Operation too slow. Less than 1 bytes/sec transfered the last
 30 seconds')
==> db12012: Trying other mirror.
==> db12012: --------------------------------------------------------------------------------
==> db12012: Total                                           143 kB/s | 7.8 MB     00:55
==> db12012: Running rpm_check_debug
==> db12012: Running Transaction Test
==> db12012: Transaction Test Succeeded
==> db12012: Running Transaction
  Installing : 2:vim-filesystem-7.4.629-5.el6.x86_64                        1/5
==> db12012:
  Updating   : 2:vim-common-7.4.629-5.el6.x86_64                            2/5
==> db12012:
  Updating   : 2:vim-enhanced-7.4.629-5.el6.x86_64                          3/5
==> db12012:
  Cleanup    : 2:vim-enhanced-7.2.411-1.8.el6.x86_64                        4/5
==> db12012:
  Cleanup    : 2:vim-common-7.2.411-1.8.el6.x86_64                          5/5
==> db12012:
  Verifying  : 2:vim-common-7.4.629-5.el6.x86_64                            1/5
==> db12012:
  Verifying  : 2:vim-enhanced-7.4.629-5.el6.x86_64                          2/5
==> db12012:
  Verifying  : 2:vim-filesystem-7.4.629-5.el6.x86_64                        3/5
==> db12012:
  Verifying  : 2:vim-enhanced-7.2.411-1.8.el6.x86_64                        4/5
==> db12012:
  Verifying  : 2:vim-common-7.2.411-1.8.el6.x86_64                          5/5
==> db12012:
==> db12012:
==> db12012: Dependency Installed:
==> db12012:   vim-filesystem.x86_64 2:7.4.629-5.el6
==> db12012:
==> db12012: Updated:
==> db12012:   vim-enhanced.x86_64 2:7.4.629-5.el6
==> db12012:
==> db12012: Dependency Updated:
==> db12012:   vim-common.x86_64 2:7.4.629-5.el6
==> db12012: Complete!
==> db12012: INSTALL TREE
==> db12012: Loaded plugins: fastestmirror, security
==> db12012: Loading mirror speeds from cached hostfile
==> db12012:  * base: centos.excellmedia.net
==> db12012:  * extras: centos.excellmedia.net
==> db12012:  * updates: centos.excellmedia.net
==> db12012: Setting up Install Process
==> db12012: Resolving Dependencies
==> db12012: --> Running transaction check
==> db12012: ---> Package tree.x86_64 0:1.5.3-3.el6 will be installed
==> db12012: --> Finished Dependency Resolution
==> db12012:
==> db12012: Dependencies Resolved
==> db12012:
==> db12012: ================================================================================
==> db12012:  Package         Arch              Version                Repository       Size
==> db12012: ================================================================================
==> db12012: Installing:
==> db12012:  tree            x86_64            1.5.3-3.el6            base             36 k
==> db12012:
==> db12012: Transaction Summary
==> db12012: ================================================================================
==> db12012: Install       1 Package(s)
==> db12012: Total download size: 36 k
==> db12012: Installed size: 65 k
==> db12012: Downloading Packages:
==> db12012: Running rpm_check_debug
==> db12012: Running Transaction Test
==> db12012: Transaction Test Succeeded
==> db12012: Running Transaction
  Installing : tree-1.5.3-3.el6.x86_64                                      1/1
==> db12012:
  Verifying  : tree-1.5.3-3.el6.x86_64                                      1/1
==> db12012:
==> db12012:
==> db12012: Installed:
==> db12012:   tree.x86_64 0:1.5.3-3.el6
==> db12012: Complete!
==> db12012: INSTALL UNZIP
==> db12012: Loaded plugins: fastestmirror, security
==> db12012: Loading mirror speeds from cached hostfile
==> db12012:  * base: centos.excellmedia.net
==> db12012:  * extras: centos.excellmedia.net
==> db12012:  * updates: centos.excellmedia.net
==> db12012: Setting up Install Process
==> db12012: Resolving Dependencies
==> db12012: --> Running transaction check
==> db12012: ---> Package curl.x86_64 0:7.19.7-37.el6_4 will be updated
==> db12012: ---> Package curl.x86_64 0:7.19.7-46.el6 will be an update
==> db12012: --> Processing Dependency: libcurl = 7.19.7-46.el6 for package: curl-7.19.7-46.el6.x86_64
==> db12012: ---> Package unzip.x86_64 0:6.0-1.el6 will be updated
==> db12012: ---> Package unzip.x86_64 0:6.0-2.el6_6 will be an update
==> db12012: ---> Package wget.x86_64 0:1.12-1.8.el6 will be updated
==> db12012: ---> Package wget.x86_64 0:1.12-5.el6_6.1 will be an update
==> db12012: --> Running transaction check
==> db12012: ---> Package libcurl.x86_64 0:7.19.7-37.el6_4 will be updated
==> db12012: ---> Package libcurl.x86_64 0:7.19.7-46.el6 will be an update
==> db12012: --> Finished Dependency Resolution
==> db12012:
==> db12012: Dependencies Resolved
==> db12012:
==> db12012: ================================================================================
==> db12012:  Package          Arch            Version                   Repository     Size
==> db12012: ================================================================================
==> db12012: Updating:
==> db12012:  curl             x86_64          7.19.7-46.el6             base          196 k
==> db12012:  unzip            x86_64          6.0-2.el6_6               base          149 k
==> db12012:  wget             x86_64          1.12-5.el6_6.1            base          483 k
==> db12012: Updating for dependencies:
==> db12012:  libcurl          x86_64          7.19.7-46.el6             base          168 k
==> db12012:
==> db12012: Transaction Summary
==> db12012: ================================================================================
==> db12012: Upgrade       4 Package(s)
==> db12012: Total download size: 997 k
==> db12012: Downloading Packages:
==> db12012: http://centos.excellmedia.net/6.7/os/x86_64/Packages/libcurl-7.19.7-46.el6.x86_64.rpm: [Errno 12] Timeout on http://centos.excellmed
ia.net/6.7/os/x86_64/Packages/libcurl-7.19.7-46.el6.x86_64.rpm: (28, 'Operation too slow. Less than 1 bytes/sec transfered the last 30 seconds')
==> db12012: Trying other mirror.
==> db12012: --------------------------------------------------------------------------------
==> db12012: Total                                            30 kB/s | 997 kB     00:32
==> db12012: Running rpm_check_debug
==> db12012: Running Transaction Test
==> db12012: Transaction Test Succeeded
==> db12012: Running Transaction
  Updating   : libcurl-7.19.7-46.el6.x86_64                                 1/8
==> db12012:
  Updating   : curl-7.19.7-46.el6.x86_64                                    2/8
==> db12012:
  Updating   : unzip-6.0-2.el6_6.x86_64                                     3/8
==> db12012:
  Updating   : wget-1.12-5.el6_6.1.x86_64                                   4/8
==> db12012:
  Cleanup    : curl-7.19.7-37.el6_4.x86_64                                  5/8
==> db12012:
  Cleanup    : libcurl-7.19.7-37.el6_4.x86_64                               6/8
==> db12012:
  Cleanup    : unzip-6.0-1.el6.x86_64                                       7/8
==> db12012:
  Cleanup    : wget-1.12-1.8.el6.x86_64                                     8/8
==> db12012:
  Verifying  : wget-1.12-5.el6_6.1.x86_64                                   1/8
==> db12012:
  Verifying  : unzip-6.0-2.el6_6.x86_64                                     2/8
==> db12012:
  Verifying  : curl-7.19.7-46.el6.x86_64                                    3/8
==> db12012:
  Verifying  : libcurl-7.19.7-46.el6.x86_64                                 4/8
==> db12012:
  Verifying  : unzip-6.0-1.el6.x86_64                                       5/8
==> db12012:
  Verifying  : curl-7.19.7-37.el6_4.x86_64                                  6/8
==> db12012:
  Verifying  : libcurl-7.19.7-37.el6_4.x86_64                               7/8
==> db12012:
  Verifying  : wget-1.12-1.8.el6.x86_64                                     8/8
==> db12012:
==> db12012:
==> db12012: Updated:
==> db12012:   curl.x86_64 0:7.19.7-46.el6             unzip.x86_64 0:6.0-2.el6_6
==> db12012:   wget.x86_64 0:1.12-5.el6_6.1
==> db12012:
==> db12012: Dependency Updated:
==> db12012:   libcurl.x86_64 0:7.19.7-46.el6
==> db12012: Complete!
==> db12012: Loaded plugins: fastestmirror, security
==> db12012: Loading mirror speeds from cached hostfile
==> db12012:  * base: centos.excellmedia.net
==> db12012:  * extras: centos.excellmedia.net
==> db12012:  * updates: centos.excellmedia.net
==> db12012: Setting up Install Process
==> db12012: Package 4:perl-5.10.1-141.el6.x86_64 already installed and latest version
==> db12012: Nothing to do
==> db12012: INSTALL SYSSTAT
==> db12012: Loaded plugins: fastestmirror, security
==> db12012: Loading mirror speeds from cached hostfile
==> db12012:  * base: centos.excellmedia.net
==> db12012:  * extras: centos.excellmedia.net
==> db12012:  * updates: centos.excellmedia.net
==> db12012: Setting up Install Process
==> db12012: Resolving Dependencies
==> db12012: --> Running transaction check
==> db12012: ---> Package sysstat.x86_64 0:9.0.4-22.el6 will be updated
==> db12012: ---> Package sysstat.x86_64 0:9.0.4-27.el6 will be an update
==> db12012: --> Finished Dependency Resolution
==> db12012:
==> db12012: Dependencies Resolved
==> db12012:
==> db12012: ================================================================================
==> db12012:  Package           Arch             Version                Repository      Size
==> db12012: ================================================================================
==> db12012: Updating:
==> db12012:  sysstat           x86_64           9.0.4-27.el6           base           233 k
==> db12012:
==> db12012: Transaction Summary
==> db12012: ================================================================================
==> db12012: Upgrade       1 Package(s)
==> db12012: Total download size: 233 k
==> db12012: Downloading Packages:
==> db12012: Running rpm_check_debug
==> db12012: Running Transaction Test
==> db12012: Transaction Test Succeeded
==> db12012: Running Transaction
  Updating   : sysstat-9.0.4-27.el6.x86_64                                  1/2
==> db12012:
  Cleanup    : sysstat-9.0.4-22.el6.x86_64                                  2/2
==> db12012:
  Verifying  : sysstat-9.0.4-27.el6.x86_64                                  1/2
==> db12012:
  Verifying  : sysstat-9.0.4-22.el6.x86_64                                  2/2
==> db12012:
==> db12012:
==> db12012: Updated:
==> db12012:   sysstat.x86_64 0:9.0.4-27.el6
==> db12012: Complete!

F:\workspace-wls\ora12base>

Login as root user run root_post_vagrant_build.sh

sudo -i

/vagrant/root_post_vagrant_build.sh

Modify the script for 12.0.2 binaries

The following is db_install.rsp sample file:

 
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v12.1.0
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME="`hostname`"
UNIX_GROUP_NAME=dba
INVENTORY_LOCATION=/home/oracle/oraInventory
SELECTED_LANGUAGES=en
ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1
ORACLE_BASE=/u01/app/oracle/
oracle.install.db.InstallEdition=EE
oracle.install.db.DBA_GROUP=dba
oracle.install.db.BACKUPDBA_GROUP=dba
oracle.install.db.DGDBA_GROUP=dba
oracle.install.db.KMDBA_GROUP=dba
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=true
oracle.installer.autoupdates.option=SKIP_UPDATES

The bash profiles are incompatible if they are opened in the host system (Windows). To work with them we need to use the dos2unix command for all text files. The Oracle database installation files are different name what we had from the github. So change those file name to work.

Edit the /vagrant/oracle_post_vagrant_build.sh script

cat /vagrant/oracle_bash_profile.txt >> ~/.bash_profile
dos2unix ~/.bash_profile
. ~/.bash_profile
cp /vagrant/*database_* /tmp
cd /tmp/
unzip linuxamd64_12102_database_1of2.zip
unzip linuxamd64_12102_database_2of2.zip
echo " unzip completed..."
cd /tmp/database/
dos2unix /vagrant/db_install.rsp
./runInstaller -noconfig -silent -responseFile /vagrant/db_install.rsp


Create Database using response file

Now we have Oracle database installed ready to create the database. You can specify how you wish to create the database and give access to whom etc in the dbca.rsp response file.
 
 dbca -silent -createDatabase -responseFile  /vagrant/dbca.rsp


Bash profile issues - [SOLVED]


When I've login to vagrant user got the following command not found. After searching many forums, I got an idea check what this file content having there I found that ^M symbols.
 

[vagrant@ora12c66 ~]$ . .bash_profile
: command not found
: command not found
: command not found

The .bash_profile calls .bashrc that is resides in the same home directory only. To resolve this simple command dos2unix converts the ASCII File to Unix format file.
 

[vagrant@ora12c66 ~]$ vim .bashrc
[vagrant@ora12c66 ~]$ dos2unix .bashrc
dos2unix: converting file .bashrc to UNIX format ...
[vagrant@ora12c66 ~]$ . .bashrc
[vagrant@ora12c66 ~]$ . .bash_profile
[vagrant@ora12c66 ~]$


Validating the Oracle Database process running

Regular ps command with grep the 'pmon' that is process monitoring gives positive signs of installation of Oracle 12c.

ps -ef|grep pmon

The next thing you need to know the Oracle Listener working or not. Using netstat command check 1521 port is in the listener list or not. Sad that it is not there. What to do? simple start the listener.
netstat -na|grep 1521
Need to resolve this...

Configuring a Listener

We have Oracle command for configuring a new Listener with netca command. Now lets explore the options for the netca comand with --help command.
[oracle@ora12c66 ~]$ netca --help
Usage: netca [-silent] { }

Perform network configuration by specifying the following arguments:
    [-silent]
        -responsefile ]
        [-local {Perform configuration on only local node}]
    -instype 
        [-listener ]
        [-lisport ]
        [-lps ]
        [-lpe ]
        [-netnum ]
        [-nostartlsnr {Do not start listener}]
    [-crsupgrade {Upgrade default listener from lower version database home to G          rid Infrastructure home (only for RAC)}]
    [-inscomp ]
    [-insprtcl ]
    [-orahome ]
    [-orahnam ]
    [-log ]
    [-h|-help {Print usage}]

Lets build the responsefile as netca.rsp follows:
[GENERAL]
RESPONSEFILE_VERSION="12.1"
CREATE_TYPE="CUSTOM"
SHOW_GUI=false
[oracle.net.ca]
INSTALLED_COMPONENTS={"server","net8","javavm"}
INSTALL_TYPE=""typical""
LISTENER_NUMBER=1
LISTENER_NAMES={"LISTENER"}
LISTENER_PROTOCOLS={"TCP;1521"}
LISTENER_START=""LISTENER""
NAMING_METHODS={"TNSNAMES","ONAMES","HOSTNAME"}
NSN_NUMBER=1
NSN_NAMES={"EXTPROC_CONNECTION_DATA"}
NSN_SERVICE={"PLSExtProc"}
NSN_PROTOCOLS={"TCP;HOSTNAME;1521"}


So using netca command with silent mode option with the responsefile for configuring the network listener:

netca -silent -responsefile /vagrant/netca.rsp
Configure Oracle Listener silent mode

References
  1. Oracle database Silent mode creation sample response file

Write your comments/ valuable suggestions.

waiting.....