- Download the Basic and the SDK Instant Client packages from Instant Client page. Either the zip file or RPMs can be used. At the moment, I choose Version 11.2.0.3.0.
- Install the RPMs as the root user, for example:
rpm -Uvh oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64.rpm
rpm -Uvh oracle-instantclient11.2-devel-11.2.0.3.0-1.x86_64.rpm
- Because I’m using php 5.6, we use pecl install oci8-2.0.12.
/usr/local/apps/php56/bin/pecl install oci8-2.0.12
If they ask location, just paste and edit based on your folder oracleinstantclient,/usr/lib/oracle/11.2/client64/lib/
- After that, add into php.ini
extension=/usr/local/apps/php56/lib/extensions/no-debug-non-zts-20131226/oci8.so
(this just example). service httpd restart