Oracle can be a real pain to get installed on your server, however, since they’ve created a Debian (Sarge and later) repository it is a lot easier. Getting it to work with PHP (in this case version 5) will be another story which this small how-to will describe.
First, add the Debian repository to your /etc/apt/sources.list by adding the following two lines at the bottom of the file;
# Oracle XE deb http://oss.oracle.com/debian unstable main non-free
Afterwards run the following chain of commands as root;
wget http://oss.oracle.com/el4/RPM-GPG-KEY-oracle -O- | apt-key add - apt-get update apt-get install oracle-xe
Now Oracle is installed on your system and it will ask you to run /etc/init.d/oracle configure first.
Since this was the easy part let’s continue to the hard part; enabling Oracle in PHP. (continue reading…)