A vagrant box that provisions Oracle 12c automatically, using only Vagrant and a shell script.
- Clone this repository
- Download the Oracle Database 12c binaries
linuxamd64_12102_database_2of2.zipfrom http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html and unzip to
- Ensure you unzip into the same directory and they merge. There are some common directories in each. On the commandline, you can run
unzip '*.zip'to do this for you.
- Install Virtualbox
- Install Vagrant
- Install VirtualBox plugin
vagrant plugin install vagrant-vbguest
- The first time you run this it will provision everything and may take a while. Ensure you have a good internet connection!
- Connect to the database (see below).
- You can shutdown the box via the usual
vagrant haltand the start it up again via
Connecting to Oracle
- All passwords are
oradata is mounted as a shared folder with permissions for Oracle to use it. If you have Oracle schemas that will consume a lot of space, create a tablespace for your schema in this directory instead of using the built in tablespaces. See tablespace.sql for an example of how to create a tablespace in this directory.
- If you need to, you can connect to the machine via
- You can
sudo su - oracleto switch to the oracle user.
- The Oracle installation path is
- On the guest OS, the directory
/vagrantis a shared folder and maps to wherever you have this file checked out.
Repeated authentication failure message
vagrant up if you experience this issue:
default: Error: Authentication failure. Retrying... default: Error: Authentication failure. Retrying... default: Error: Authentication failure. Retrying... default: Error: Authentication failure. Retrying... default: Error: Authentication failure. Retrying...
Then you may have hit a bug in vagrant 1.8.5. See http://stackoverflow.com/questions/22922891/vagrant-ssh-authentication-failure
The solution is to:
vagrant ssh password: vagrant chmod 0600 ~/.ssh/authorized_keys exit
Connection time after startup
Once Oracle and the listener starts up, it may take a few moments until you are able to connect to the DB, eg via SQL Developer.
Provisioning fails with "id: oracle: no such user"
Comment out line 35 in the Vagrant file. This mounts an additional folder however depending on how long it takes the machine to boot, the database might startup before that happens and things will complain.