**Issue**
– How to install oci8 on centos 5
– This is the procedure in installing oci8 (oci8-1.4.7.tgz) support to a RHEL / CentOS 5.5 x86_64.
Note : Before starting, you must install php, php-devel and httpd packages
1. Download oracle instant client (basic and devel) from :
`http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxsoft.html`
File Names :
“`
oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64.rpm
oracle-instantclient11.2-devel-11.2.0.3.0-1.x86_64.rpm“`
2. Install the basic and development package.
“`
[root@JobNix ] rpm -ivh oracle-instantclient-basic-11.2.0.3.0-1.x86_64.rpm #replace -ivh with -Uvh if you are upgrading
[root@JobNix ] rpm -ivh oracle-instantclient-devel-11.2.0.3.0-1.x86_64.rpm #replace -ivh with -Uvh if you are upgrading“`
3. Link the installation dynamically
“`
[root@JobNix ] echo /usr/include/oracle/11.2/client/lib/ > /etc/ld.so.conf.d/oracle_client.conf
[root@JobNix ] ldconfig -v“`
4. Download oci8 package from http://pecl.php.net/package/oci8
`[root@JobNix oci8-1.4.7] wget http://pecl.php.net/get/oci8-1.4.7.tgz`
5. Extract and install the package
“`
[root@JobNix oci8-1.4.7] tar -zxvf oci8-1.4.7.tgz
[root@JobNix oci8-1.4.7] cd oci8-1.4.7
[root@JobNix oci8-1.4.7] phpize
[root@JobNix oci8-1.4.7] ./configure -with-oci8=shared,instantclient,/usr/lib/oracle/11.2/client64/lib/
[root@JobNix oci8-1.4.7] make
[root@JobNix oci8-1.4.7] make install“`
6. Add the library shared object for PHP
`[root@JobNix oci8-1.4.7] echo extension=oci8.so > /etc/php.d/oci8.ini`
7. restart Apache
`/etc/init.d/httpd restart`
8. Check phpinfo, Now It should show that the oci8 support is enabled.
`php -i |grep -i “OCI8 Support” -A20`
“`
OCI8 Support => enabled
Version => 1.4.7
Revision => $Revision: 321634 $
Active Persistent Connections => 0
Active Connections => 0
Oracle Run-time Client Library Version => 11.2.0.3.0
Oracle Instant Client Version => 11.2
Temporary Lob support => enabled
Collections support => enabled“`
Directive => Local Value => Master Value
oci8.connection_class => no value => no value
oci8.default_prefetch => 100 => 100
oci8.events => Off => Off
oci8.max_persistent => -1 => -1
oci8.old_oci_close_semantics => Off => Off
oci8.persistent_timeout => -1 => -1
oci8.ping_interval => 60 => 60
oci8.privileged_connect => Off => Off
oci8.statement_cache_size => 20 => 20
Tags: oci8-1.4.7.tgz, how to install oci8 on centos 5