Automatically installing Oracle 18c with your Vagrant/VirtualBox deployment

After Vagrant, VirtualBox, and the plugin that allows them to interact are installed, we will invoke Vagrant commands to get this work done. Vagrant can also do things like mount drives and kick of shell scripts, that's where the heavy lifting will be done to kick off the installed with a silent response file. The code we will be using is contained in a project on GitHub. Check out the Readme at https://github.com/dmann99 This is based on code by totalamateurhour.

1) Get the files that will control this deployment:

cd \work
git clone https://github.com/dmann99/oracle-18c-vagrant

- or -

Download and unzip https://github.com/dmann99/oracle-18c-vagrant/archive/master.zip to c:\work .

Now files will be available in the c:\work\oracle-18c-vagrant project directory. The Vagrant specific files and scripts are in the "18" subdirectory.

2) Get the Oracle Binaries Install File

As per the project ReadMe, download the Oracle Database 18c binaries LINUX.X64_180000_db_home.zip or V978967-01.zip from http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html . Place this zip file in the c:\work\oracle-18c-vagrant\18 directory. It will be mounted by the VM that starts up and accessed by the shell script that performs the install. Once you are in the VM you can access the c:\work\oracle-18c-vagrant\18 files via the /vagrant subdirectory.

3) Customize Vagrantfile If Needed

Review the c:\work\oracle-18c-vagrant\18\Vagrantfile text file. If you will only have 1 environment configured or this is your 1st install you can skip customization.

If you are managing more than one deployment, see the page in this notebook covering multiple environments.

4) Initiate Deployment

cd \work\oracle-18c-vagrant\18
vagrant up
Vagrant will start and read the default .vagrantfile in the current directory to determine what needs to be done. If no local cached copy of the desired VM is available (in this case Oracle's ol7-latest.box VM) it will be downloaded. After that the VM is started and any machine specific configs from the Vagrantfile are applied. scripts/install.sh is run and passed the arguments supplied in the call. Since we are starting up a fresh vm and customizing it with Oracle software it may take a while for the first startup. Once the scripts are complete you can ssh into the box:
vagrant ssh
su root
su oracle
sqlplus / as sysdba
Check the scripts for the default passwords of the database accounts or set to your preference.