Friday, March 11, 2011

Installing oracle-instantclient on Centos 5.5

1. Download oracle instantclient rpm from Oracle for your platform

Need to download these two rpms.


2. Install
# rpm -ivh oracle-instantclient-*

Getting and compiling oci8 extension for PHP

# pear download pecl/oci8
# tar zxvf oci8-1.4.5.tgz
# cd oci8-1.4.5
# ./configure --with-oci8=instantclient
# make
# make install

Create a file called /etc/php.d/oracle_oci.ini and place the following line

Restart Apache

Create a .php file with call to phpinfo(); and confirm that oci8 is loaded in apache, you can also check if module is loaded with php -m.

1 comment:

  1. FYI, I think before you run configure, you need to run phpize.