In this post we will install Oracle XE on the virtual Debian server that we installed in part 1. This installation is described in detail on several sites. I started with the instruction from this site.
With the production release you only need the instructions in the grey box:
First log in as root and add to the /etc/app/sources.list:
deb http://oss.oracle.com/debian unstable main non-free
Perform an update with:
apt-get update
Then we install the oracle-xe package with:
apt-get install oracle-xe
This may take a while since it has to download the Oracle XE package. After the installation you will get this:

Like it says, the next step is to perform the command
/etc/init.d/oracle-xe configure
I accept all defaults so the database is started automatically when the Debian instance is started, but hey, that’s the only reason I made this instance.
When the database is installed, we need to make it accessable from outside the Debian server. There are several ways to this this. The way I did this is to setup a ssh tunnel to the Debian server from my Mac OS so I can access the Apex application with a browser (I found this tip here).
To setup the tunnel (this is done on the host system, Mac OS in our case) open up a terminal window and enter the command:
ssh 192.168.2.32 -L 8081:localhost:8080
(Btw, to obtain the ip address of the Debian server you perform the command ‘ifconfig’ and you get something like the following where ‘eth0′ is the adapter with the needed IP address:

So when the ssh command is issued we login into the Debain box as shown here:

While this ssh connection is open, we can open up a browser in the Mac OS and go to the url ‘http://localhost:8081/apex’ and we end up on the Debian host:

In the Apex application choose ‘Administration’ and on the right side of the screen choose the option ‘manage http access’. In the screen that then appears, select the option ‘Available from local server and remote clients’ and click ‘Apply Changes’.

When this change is done, we can access the Apex application directly from the host with the following url:’http://192.168.2.32:8080/apex’. The ssh tunnel is no longer needed.
Now the Oracle XE installation is ready to be used in the Mac OS and it will take a minimum of the available memory.