In a previous blog post, I described the steps to streamline the pre-installation steps on Oracle Linux for Oracle Database 12c using the Database preinstallation package. In this post you will learn how to do a fully automated installation of Oracle Database 12c on Oracle Linux running in an Oracle VM VirtualBox guest. The tutorial is based on a Vagrantfile published in our Vagrant repo on GitHub.
Because this installation method uses VirtualBox, Vagrant and an Oracle Linux Vagrant Box, the whole process can be automated, requiring minimal to no input. Assuming you have VirtualBox, Vagrant and git installed, these are the steps needed to install Oracle Database:
- Clone the relevant GitHub repository
- Download the Oracle Database 12c installation media from OTN
- Issue a Vagrant to create the VM and start the Database installation process
- Wait 15-25 minutes, depending on your network bandwidth and machine horsepower
The commands are straightforward:
$ git clone https://github.com/oracle/vagrant-boxes
$ cd vagrant-boxes/OracleDatabase/184.108.40.206
<download Oracle Database installation zip file>
$ vagrant up
How Does This Work?
Assuming you have the required tools in place, the steps summarized earlier cause Vagrant to do the following:
- read the Vagrantfile (more about that later)
- create a headless VM based on the pre-packaged Oracle Linux 7 Vagrant box
- provision the VM by runing a script that
- updates Oracle Linux to the latest available packages from Oracle Linux yum server
- performs Database pre-installation checks and installs required packages
- unzips the Database installion files,
- installs the Oracle Database 12c software
- creates a database and pluggable database container
After the installation has completed, you can either log in to the guest VM itself and interact with the Database there or, you can leave the VM running —headless— and connect from the host operating system to the Database using tools such as SQL Developer.
For step by step instructions on how to run an automated installation of Oracle Database 12c in a VirtualBox VM, connect to the Database and save and restore snapshots of the VM,