Fastest creation of a Lean VirtualBox VM Image with Oracle Database 11gR2 XE, the Node.JS 7.x and the Oracle DB Driver for Node

Lucas Jellema 1

For a workshop on Node.js I needed a VM to demonstrate and students try out the Oracle DB Driver for Node. I wanted a lean VM with the bare minimum: Oracle Database XE, Node, the Oracle DB Driver for Node and the Git client (for fetching sources from GitHub). I stumbled across the OXAR repository in GitHub ( ) – Oracle XE & APEX build script along with images for popular cloud platforms . Using the sources I found here, I could create my VM in a few simple, largely automated steps. I ended up with a 4.5 GB sized VM image (which exports as a 1.5 GB appliance) that runs in 1 GB. It is more than adequate for my needs.

The steps – for myself if I need to go through them again and of course for you, the reader, to also create this handsome, useful VM.

The steps for creating your own VM image are as follows:

1. make sure that you have Vagrant and VirtualBox installed locally ( and

2. get the OXAR repository content

git clone

3. Download Oracle 11gR2 XE  installer for Linux from OTN: and copy the downloaded file (the Linux installer for Oracle 11gR2 XE Database downloaded from OTN) to the OXAR/files directory

4. edit the file in the OXAR root directory


– set parameter OOS_ORACLE_FILE_URL to file:///vagrant/files/ and save the change:



Use the OOS_MODULE_XXX flags to specify which components should be installed. Here I have chosen not to install APEX and NODE4ORDS.

5. run vagrant using the statement:

vagrant up

this will run for a file, download the CentOS base image and create the VM (with NAT network configuration), install all of Git client, Oracle 11gR2 XE Database, Node and Node OracleDB Driver

6. after rebooting the system, the VM will be started (or you can start it using vagrant up again or by using the VirtualBox manager).


You can start an SSH session into it by connecting to localhost:50022, then login to Linux using vagrant/vagrant


7. connect to the database using sqlplus hr/oracle


8. Try out Node.js


9. To try out Node against Oracle Database using the driver, you can clone the GitHub Repository:

git clone


Next, cd into the newly created directory


and run the file select.js:


10. To try out PL/SQL as well:

Create the procedure get_salary using the file get_salary_proc.sql



Run Node program plsql.js:


One thought on “Fastest creation of a Lean VirtualBox VM Image with Oracle Database 11gR2 XE, the Node.JS 7.x and the Oracle DB Driver for Node

  1. Hey Lucas, can I suggest you guys make your blog titles shorter? Quite often they are longer than the 140 character limit Twitter imposes, so I have to edit them if I want to tweet it! 🙂


Comments are closed.

Next Post

Oracle Database standard Geo Location Support using Locator (included in every edition!)

Many databases have native support for locations en geodata – and determining distance and closest locations (within a certain perimeter). Oracle Database has the [Graph and] Spatial Option – that supports even the most advanced and exotic forms of location related data querying (including multidimensional shapes and probably relativistic effects); […]
%d bloggers like this: