1. You have VirtualBox installed
2. You have the necessary Oracle installation files (oracle-xe, apex5, ords3 and sqlcl)
- Oracle XE - download from: http://www.oracle.com/technetwork/database/database-technologies/express-edition/downloads/index.html
- Apex 5 - download from: http://www.oracle.com/technetwork/developer-tools/apex/downloads/index.html
- ORDS 3 - download from: http://www.oracle.com/technetwork/developer-tools/rest-data-services/downloads/index.html
- SQLcl - download from: http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html
3. You have the installation image for CentOS - I just grabbed the Minimal image from a local mirror - http://centos.mirror.digitalpacific.com.au/7/isos/x86_64/
Set up the virtual machine
Give the Virtual machine an appropriate name, and since CentOS is based off Red Hat, specify the type as Red Hat (64-bit).
Allocate 1GB RAM
Create a new virtual hard drive (for this demo, I will go with a 10gb disk size).
Your machine and virtual hard drive will now have been created and you should see the machine in your machine list in Virtual Box. The next step is go into settings to apply some configuration.
Firstly, you will want to verify your network configuration - for this demo, I will just be using a bridged network connection.
You will also want to load in the Linux disk image. This is done through the storage tab by selecting the empty disk node and selecting the image - mine has been used in the past, so I can easily select it without locating a new disk.
Now we can start up the machine and install the operating system.
Before you begin the installation process you will want to go into network configuration and turn on the device as well as giving the machine a host name.
Once the installation begins, you will want to set the root password and create a personal user account. Here, I also make my self an administrator - this will allow us to run commands as root using the sudo command.
Once that process has finished, you can reboot the machine to get into your newly installed system.
Transferring the Oracle files to your machine
Before getting started we need to have all the installation media on our new server. I have already downloaded these files onto my machine. So first, I'll create a folder on the server where I will transfer these to.
Then to transfer the files across, I'll use FileZilla (an FTP program). We can connect here using sftp (which uses the SSH port/22).
Installing Oracle XE, APEX, ORDS and SQLcl
The next step is to install Oracle. There is a project on GitHub that has some scripts that basically automate the whole installation process. So for this, we will need to first install git.
sudo yum install git
The project is located at: https://github.com/OraOpenSource/oraclexe-apex
So, we need to clone the project onto our server, which is done with the following command.
git clone https://github.com/OraOpenSource/oraclexe-apex.git
This will clone all the project files into a new folder named oraclexe-apex at the current file location. The next step is to change into that directory
In this folder, there is a config file that needs updating - config.properties. One editor that comes installed on our minimal CentOS is vi, but you can install another if you prefer - a popular choice is nano.
The important properties you need to add a value for are:
#To download Oracle XE, go to: http://www.oracle.com/technetwork/database/database-technologies/express-edition/overview/index.html OOS_ORACLE_FILE_URL=file:///home/trent/orafiles/oracle-xe-11.2.0-1.0.x86_64.rpm.zip #To download APEX, go to: http://download.oracleapex.com OOS_APEX_FILE_URL=file:///home/trent/orafiles/apex_5.0_en.zip #To download ORDS, go to: http://www.oracle.com/technetwork/developer-tools/rest-data-services/overview/index.html #Note, for now ORDS 2 is in production. ORDS 3 specific scripts have also been included and need to be finalized once its out of beta OOS_ORDS_FILE_URL=file:///home/trent/orafiles/ords.220.127.116.11.10.23.zip #To downlaod SQLcl, go to: http://www.oracle.com/technetwork/developer-tools/sql-developer/overview/index.html #Note: at time of writing SQLcl is still in beta #No default value in here since only if you want to add it in (not required) OOS_SQLCL_FILE_URL=file:///home/trent/orafiles/sqlcl-18.104.22.168.121.1046-no-jre.zip
The path starts with file:///home/trent/orafiles because my user account is named trent, and I placed all the files in a new folder named orafiles.
The rest of the parameters are quite self explanatory - mostly relating to ports to use for various services.
The script also creates an APEX workspace during the installation. If you don't wish to create a workspace/user during the installation, you can set the property OOS_ORACLE_CREATE_USER_YN to N. Otherwise, you can update the property OOS_APEX_USER_WORKSPACE to your preferred workspace name.
I'd also suggest updating OOS_APEX_ADMIN_EMAIL to something other than firstname.lastname@example.org (default).
Now, we can start the installation process.
This installation process should take around 20 minutes to complete. After it completes, the script is set to reboot the machine - so ensure you save any unsaved work before running the above.
Once it has completed and successfully rebooted, you should then be able to access APEX on port 80. e.g. if your IP address of your machine is 192.168.1.10, you would access with: http://192.168.1.10. The default login details for the internal workspace are admin/Oracle1! (if you didn't update those configuration parameters).
It's also worth noting that the default configuration doesn't leave open port 1521 for connecting to the database. So you will need to set up SSH port forwarding on your local machine in order to connect (or open that port on the server). SQL Developer has support for this from within the software.