Oracle Database 18c XE (eXpress Edition) is the free community edition of the enterprise edition of Oracle Database. Oracle Database XE has almost all features of Oracle Database; however, it is limited in non-functional terms (2 CPUs, 2 GB memory, 12 GB data volume). Oracle is generous in the terms under which XE can be used:
“We grant you a nonexclusive, nontransferable limited license to use the programs for: (a) purposes of developing, prototyping and running your applications for your own internal data processing operations; (b) you may also distribute the programs with your applications; (c) you may use the programs to provide third party demonstrations and training; and d) you may copy and distribute the programs to your licensees provided that each such licensee agrees to the terms of this Agreement.”
You can include Oracle Database XE in your production systems and in your own products that you sell to third parties.
It is not difficult to get going with Oracle Database 18c XE. You can simply download the installer for your platform and run it, to install the database natively on your platform. If however you prefer to manage all software in VMs and containers – like I do – there are other options. One such option is to make use of Vagrant and VirtualBox – to install and run Oracle Database XE in a Virtual Machine. The resulting Virtual Machine is very easily managed with vagrant commands: vagrant up, vagrant ssh (to open a terminal into the VM to perform admin actions) and vagrant halt (to stop the VM).
The instructions and scripts for automated creation of the VM and installation & configuration of the database can be downloaded from the Oracle GitHub Repository: https://github.com/oracle/vagrant-boxes/tree/master/OracleDatabase/18.4.0-XE .
The steps we have to go through:
1. Prepare: download and install Vagrant and VirtualBox
2. Download the Oracle Database XE 18c installer for Linux from OTN: https://www.oracle.com/technetwork/database/database-technologies/express-edition/downloads/index.html
3. Git clone the GitHub repository
4. Move the downloaded Database Installer (rpm file) to the OracleDatabase\18.4.0-XE directory in the cloned Git repo
5. Run the command: vagrant up
and wait for 10-20 minutes for the preparation of the database. No other manual intervention is required.
Some remarkable log messages:
See how port forwarding is configured, to allow us to access the database later at localhost:1521.
After downloading the base box, the database software is installed into the VM:
And the final step:
At this point the VM is fully prepared. It is running. We can connect to the database – as if it was running on our laptop (thanks to port forwarding).
and check the contents of our database:
and create a connection to the PDB:
Or connect to the database from within the VM using SQL*Plus:
- 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
With vagrant halt I can stop the database (and the VM) and with vagrant up I can start it up again.