pátek 15. ledna 2016

Pre-Built Oracle Database 12c in VirtualBox

Every developer sometimes needs full-featured database for testing purposes. Developer has two typical choices:
  • To use shared database installed on company servers - He does not care about installation, administration etc but during his experiments he can make this database instance unstable and cause all team-mates angry:) Developer cannot also do some administration tasks because of he has no access to system privileges. System access to database is in the competence of DBA department.
  • To use it's own database installed on his desktop locally - In this case must be developer able to install database from scratch: This is magical and boring task.
Therefore Oracle prepared various set of pre-builded VMs where the installation is easy. For application developers is suitable to use "Database App Development VM". This image has quite small footprint (2GB RAM, can be downgraded to 1.7GB) and contains only necessary tools.

This post shows you step by step how to install this image and use database from outside VM (yor desktop OS) with minimal effort:
  1. Download and install virtual box from official page

  2. Download Pre-Built Developer VM from Oracle named "Database App Development VM" from http://www.oracle.com/technetwork/community/developer-vm/index.html#dbapp

  3. Import Database App Development VM into VirtualBox
    1. Import appliance (Ctrl-I) or (menu > File > Import appliance). Select .ova file. Next button.



    2. Dialog Appliance Settings: No changes. Just press import button,

    3. Add "vboxnet" for your global VirtualBox setting: Press Ctrl+G, Choose Network, Choose Host-only Networks, Add button, set Ip addess and mask (192.168.57.1, 255.255.255.0).



    4. DO NOT CLOSE YET THE DIALOG. Switch to DHCP Server tab, enable it and configure it according to picture. Now, you can close:).



    5. Configure VM - set network adapter 1 as vboxnet : Choose Oracle DB VM, Press Settings, Choose Network, Choose Adapter no 1. Set Host-only Adapter (which was created in previous step).



  4. Start Oracle DB VM

    1. Disable oracle REST services for less memory consumption in VM. (This is java process and takes cca 300MB RAM) :

      1. Open terminal and execute "chmod -x ./ords.sh". Restart VM
      2. Check if process is not running by executing in terminal "ps aux | grep ords.war"



  5. Connect to database running inside VM from your desktop system via sqldeveloper or another client:



Summary:

Pre-built VM image is more or less a black-box which is not consuming so much resources on developer's desktop. You can quit fast re-create whole VM when something goes wrong and because of it comes from oracle, you can find another guides and advices what to do with it.



6 komentářů: