NOTE: even though the steps described in this article all work – I am running into a problem with shutting down and starting up the VM again. So at the present I can have the VM created and the database installed – however, I can not successfully restart it. I am not sure if it is my environment, the Base Box or something in the configuration files provided by Yasushi. Please tread carefully when going through the steps described below.

A short time ago, Oracle release Oracle Database 12c – release 12.1.0.2. With a bunch of goodies that I would like to try out. This release can be downloaded from OTN: http://www.oracle.com/technetwork/database/enterprise-edition/downloads/database12c-linux-download-2240591.html. And subsequently I can create or clone a Virtual Machine, do the necessary preparations and run the installer. Nothing wrong with that of course. However, my recent work with Vagrant and Puppet has made me … more efficient or lazier – I am not sure what the best expression is. Anyways, things can be really simple with today’s tools and with friends on the internet who share their own goodies (and I do not want you to take that in the wrong and possibly funny way).

Let me be more specific: Yasushi YAMAZAKI from Tokio, Japan made his Vagrant/Docker configuration files available on GitHub that will stamp out the complete VirtualBox VM with Oracle Linux (6.5) and with a few manual steps (too bad about these…) Oracle Database 12c (12.1.0.2) can be installed on it: https://github.com/yasushiyy/vagrant-docker-oracle12c.

All I have to do to create the VM (since I have already installed Vagrant and VirtualBox locally – see this article for instructions on this very simple installation):

download the two database installation files from OTN

download Yasushi’s Git repository and extract the zip file to a local directory or (Git) clone the repository to that same local directory; let’s call it the VAGRANT_12_1_0_2_HOME for now.

optional: you may consider making a few small changes to the Vagrantfile, in particular add a line to assign an IP address that makes the VM accessible from the host or from other VMs and perhaps one or more shared folder definitions; my Vagrantfile now looks something like:

create a subdirectory called database and extract the two download files from OTN to this directory VAGRANT_12_1_0_2_HOME

open a command line and navigate to directory VAGRANT_12_1_0_2_HOME

run: vagrant plugin install vagrant-vbguest

run: vagrant up

At this point, Vagrant takes over and starts to create the VM based on a Vagrant Box

After some time – between 10-30 minutes, depending on your environment – the VM is ready and running – without the database on it, but fully prepared to become the proud owner of a running Oracle Database 12.1.0.2:

Manual Database installation

Now comes the “hard” part that requires some manual action: run:

vagrant ssh

(to connect to the container; alternatively use Putty to open a session to the VM and login with vagrant/vagrant)

thanks for the comprehensive and well-written article which I found by chance searching for information on installing a virtualised oracle 12 instance.

Regarding your note restarting it I don’t have an automated solution but ingrediences should be a `docker commit …` to persist the changes to a (new) docker image and on vm restart you would with `oracle` role need to start the LISTENER again as in the `netca` call you listed plus doing a `startup` in an `sqlplus ‘/ as sysdba’` session.