It isn't quite dead simple on 64 bit versions that run headless. Trust me, I wish it were. It is completely possible but it isn't dead simple. Dead simple is running instant client setup on Solaris 5.10.
Ok,
Simple, cause we run 64bit headless vm's. It's 7 major steps.
Installing oracle instant client on ubuntu.
Install the required software to compile on ubuntu.
sudo apt-get install build-essential php5-dev php-pear libaio1 unzip
Download the Oracle Instant Client, you need the basic (not rpm) and the sdk
Run these commands
cd /opt
sudo unzip <location-of-instant-client-basic>
sudo unzip <location-of-instant-client-sdk>
mv instantclient_11_1 instantclient
cd instantclient
sudo ln -s libclntsh.so.11.1 libclntsh.so
The symbolic link is needed by during the compilation step later.
Now install the oracle php module
sudo pecl install oci8
You will be prompted for the location of the library:
instantclient,/opt/instantclient
If successful, you may now add a file containing the following line to /etc/php5/conf.d/
extension = oci8.so
Now install your tnsnames.ora file into /opt/instantclient
Now you need to specify a path in the Enviroment variable TNS_ADMIN. This should point to your tnsnames.ora file on the server. I placed my tnsnames.ora in /opt/instantclient and used the SetENV function in the /etc/apache/envvars file to set the path.
export TNS_ADMIN=/opt/instantclient
Restart apache
sudo /etc/init.d/apache2 restart
Check <?php echo phpinfo() ?> to verify if the OCI8 module is available.
Very easy to do. PDO after that is even easier. We run 75 ubuntu servers.