HowTo install Oracle Instant Client and PHP OCI8 module under Debian Squueze (Ubuntu) 64bit
1) Download the Basic and the SDK packages from http://www.oracle.com (registration needed).
# mkdir -p /opt/oracle/instantclient
# cd /opt/oracle/instantclient
# wget http://download.oracle.com/otn/linux/instantclient/112020/instantclient-basic-linux-x86-64-11.2.0.2.0.zip
# wget http://download.oracle.com/otn/linux/instantclient/112020/instantclient-sdk-linux-x86-64-11.2.0.2.0.zip"
2) Unzip files, move it in correct location and delete unnecessary archives
unzip instantclient-basic-linux-x86-64-11.2.0.2.0.zip
unzip instantclient-sdk-linux-x86-64-11.2.0.2.0.zip
mv instantclient_11_2/* ./
rm -r instantclient_11_2/ instantclient-basic-linux-x86-64-11.2.0.2.0.zip instantclient-sdk-linux-x86-64-11.2.0.2.0.zip
3) Craate missing simlinks
ln -s libclntsh.so.10.1 libclntsh.so
ln -s libocci.so.10.1 libocci.so
4) Install packages
# aptitude install build-essential php5-dev php-pear libaio1
# pecl install oci8 (on question reply: instantclient,/opt/oracle/instantclient)
5) Enable the oci8 module in the php.ini
# vi /etc/php5/apache2/php.ini
extension=oci8.so (put this line after the examples starting with ;Dynamic Extension).
# vi /etc/php5E/cli/php.ini
extension=oci8.so (put this line after the examples starting with ;Dynamic Extension).
6) Restart Apache Web server
/etc/init.d/apache2 restart
Now stop and start Apache. You should see the oci8 module in the output of phpinfo().