Since a week I am the proud owner of a MacBook. Besides all new nice features and tools I was getting with the MacBook I knew there was (at least) one thing I would miss: Oracle XE installation for Mac OS. Since I use this XE a lot for research and development I had the workaround for this high on my list of things to do.
While setting up my workaround, I noticed there are already a lot of articles about this issue, but nevertheless I decided to post my solution, worst case it would only be for my own reference in future :-)
Like I said my goal was to setup a virtual server running Oracle XE so I could access the database from Mac OS. My most important goal was to keep the memory footprint as low as possible (and cheap as possible). So setting up a virtual server running Windows was not an option! I choose to use Debian Linux, it’s free and without the graphical user interface it has a very low memory footprint. The rest of this post I will describe how I set up Debian with Sun’s Virtual Box. In the next post I will describe how to install Oracle XE on the Debian server.
First step is to download Sun xVM Virtual Box for Mac OS and install it on your MacBook. Next step is to download the Debian software here.
When this download is done we can create a virtual machine in VirtualBox and choose Debian as operating system. Make sure you map the downloaded iso for Debian as CD/DVD drive like shown here:

Another important thing is to set the Network Adapter to ‘host interface’ so you can use your current internet connection that you have in Mac OS automatically in the Debian instance (assumed you have an internet connection!). The virtual hard disk is set to max 8 GB. This will be sufficient for me to run Oracle XE but you can create a bigger one of course if your going to do more with this server. At the end you must have something like this:

When this is done you can start the virtual machine and you will be asked to setup Debian. The most of the installation is quite simple, only one thing I did especially for Oracle XE was define a 1.5 GB swap disk space at my virtual hard disk (I was told this was mandatory but I am not sure about that). This is how I did this:
Somewhere during the setup you will be asked to partition the hard disk. When this appears you choose ‘Manual’ from the menu:

Next choose the hard disk to partition (for the virtual machine newbies: don’t worry about your Mac OS installation: this hard disk is your virtual one and will not affect your Mac OS installation!)

Continue the setup to partition the first part of the disk as normal space. Just make sure you reserve 1,5 GB for the swap space. Here are the steps to perform:

width=”600″ />

Make sure here you’ll keep 1.5 GB available

Now the main part is setup. Now select the 1.5 GB free space to create the swap space.

Here is the important part. Select the ‘Use as’ and give to make the other option available.

Pick the ‘swap area’ as your choice and proceed.

Finally choose ‘yes’ to perform the partitioning of the disk.

Next question is to add a network mirror, which I didn’t to keep the installation as minimal as possible:

If you are working behind a proxy you will get the following screen that takes a while to disappear:

And after a while you will get (but we will fix this later, but only if you are after a proxy):

The last choice you have to make is the following:

I deselected both options, again to keep the footprint as minimal as possible. After this, proceed with the process and fill in the mandatory answers. At the end of the installation the system will restart and the installation is finished.
Now it is time to shutdown the guest system and modify the virtual machine settings in VirtualBox. If we don’t do anything, the system will start to install again after we start it again. In the VirtualBox change the boot order so the hard dsik preceeds the cd-rom from now on, like shown here:

After this is changed, startup the Debian server again and login as ‘root’ user (normally you don’t do this but for the following task it make things a little easier).
If you are working behind a proxy then give the following command to enter the proxy:
nano /etc/profile
Add the following line to the file:
export http_proxy=http://user:password@my.proxy.host:proxy_port
Save the file and perform the following command to load the profile:
source /etc/profile
Next step is to modify the sources.lst file. This file contains the repositories which Debian uses for downloading necessary tools, libraries, etc. To open the file go to the directory ‘/etc/apt/’ and open the file ‘sources.list’ with the ‘nano’ command:
cd /etc/apt
nano sources.list

If you are behind a proxy you have to uncomment the lines:
deb http://security.debian.org/ etch/updates main contrib
deb-src http://security.debian.org/ etch/updates main contrib
And add the following lines:
deb http://ftp.debian.org/debian unstable non-free
deb http://ftp.nl.debian.org/debian/ etch main

Where the last line is depending on the location where you are.
Here is the complete content of the file:

Now we have set the repositories and set the proxy, if needed, we can get the necessary updates by performing the command:
apt-get update
If everything went well you will see the system downloading several packages. When the update is finished, we install one package, which we will need later and that is the ‘ssh’ package. With this package also other dependent packages are installed. To install the package we issue the command:
apt-get install ssh
And that’s it. We now have a Debian installation ready to have Oracle XE installed on it, which I will show in the next post.