Tuesday, April 27, 2010

XE and Apex on a Slicehost

For a while I have considered getting a hosting service for my apex applications. The community have made a list of some of the providers. All of them charge depending on the amount of storage capacity that you need. They have a fairly high monthly rate compared to the amount of storage. For instance htmldb-hosting.com charges $32/month for 50MB and $140/month for 500MB.

Previously I have looked into just renting a server and installing a oracle express edition on it. In the past I have had some trouble with it, as the OS provided was not the easiest to install XE on. However, Slicehost have now upgraded their selection of OS and I give it another go.

I chose to get a 15GB storage, and 384MB of memory slice. It will cost me $25/month. In order to avoid any unplesant experienced a I added a backup for $7.5. When this is installed I'll be able to use up to 4GB of storage in Apex (limited by the XE edition), and I'll still have 5-10GB left on the server that I can use for other purposes.

Installation process.

Get a slicehost, chose Ubuntu 9.10 32-bit OS. Shortly after this is done you'll get an e-mail with the root password and the IP of your new server. You can log in using a web console on slicehost page or use ssh.

After logging in to the new server:
dd if=/dev/zero of=/mnt/swap.img bs=1M count=780
mkswap /mnt/swap.img
swapon /mnt/swap.img

vi /etc/fstab
add the following line
/mnt/swap.img none swap sw 0 0

vi /etc/apt/sources.list
add the following line:
deb http://oss.oracle.com/debian unstable main non-free
Run
wget http://oss.oracle.com/el4/RPM-GPG-KEY-oracle  -O-
| sudo apt-key add -
apt-get update
apt-get install oracle-xe
You now got a oracle user and a running XE database. If you need to upgrade apex you can use the following guide.