Download:
instantclient-basiclite-linux.x64-11.2.0.3.0.zip http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html
instantclient-sdk-linux.x64-11.2.0.3.0.zip
http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html
oci8-1.4.10.tgz
http://pecl.php.net/package/oci8
Decompress and Compilation:
unzip instantclient-basiclite-linux.x64-11.2.0.3.0.zip
unzip instantclient-sdk-linux.x64-11.2.0.3.0.zip
tar –zxvf oci8-1.4.10.tgz
cd instantclient_11_2
ln -slibclntsh.so.11.1 libclntsh.so
cd ..
mkdir /usr/lib/oracle/11.2/client64/lib
mv ./instantclient_11_2/*/usr/lib/oracle/11.2/client64/lib
cd oci8-1.4.10
phpize
./configure--with-oci8=instantclient,/usr/lib/oracle/11.2/client64/lib
make install
# Here you can see like /usr/local/lib/php/extensions/no-debug-zts-20100525,next stop use
EditConfigurge:
php.ini
vim /data/usr/local/lib/php.ini
#Addori8.so path
extension=/usr/local/lib/php/extensions/no-debug-zts-20100525/oci8.so
/etc/profile
vim /etc/profile
#Add Environment Variables
exportLD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/oracle/11.2/client64/lib
echo “/usr/lib/oracle/11.2/client64/lib”> /etc/ld.so.conf.d/oracle.conf
source /etc/profile
ldconfig
Restart httpd server:
server httpd restart
#just need reload php.ini
Reference material:
http://www.oracle.com/technetwork/articles/technote-php-instant-084410.html