1) install apache, php …
yum install httpd php php-mysql php-pear php-devel zlib zlib-devel
yum groupinstall « Development Tools »
2) Download and install oracle instant client (basic and devel) from there:
http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxsoft.html
rpm -Uvh oracle-instantclient-basic-<VERSION>.i386.rpm
rpm -Uvh oracle-instantclient-devel-<VERSION>.i386.rpm
3) Add the Oracle instant client to dynamic linker
echo /usr/include/oracle/<VERSION>/client/lib/ > /etc/ld.so.conf.d/oracle_client.conf
ldconfig -v
4) Untar the PECL package and prepare it for compiling
tar -xzvf oci-<VERSION>.tgz
cd oci-<VERSION>
phpize
5) Configure the PECL package as a shared object using the instant client and specifying where the Oracle client libraries are. Then build and install it.
./configure –with-oci8=shared,instantclient,/usr/lib/oracle/<VERSION>/client/lib
make
make install
6) Add the library shared object for PHP
echo extension=oci8.so > /etc/php.d/oci8.ini
7) Start Apache
’service httpd start’ _or_ ‘/etc/init.d/httpd restart’
Create a PHP info page and checked to see if the Oracle (oci8) driver is listed:
echo <? phpinfo(); ?> > /var/www/html/phpinfo.php
Just one mistake :
echo /usr/lib/oracle//client/lib/ > /etc/ld.so.conf.d/oracle_client.conf
Many thanks for this howto.
Thanks also from me for this HOWTO. On RHEL, I’d echo @kartnico, in that the path was very slightly modified. I found the following worked for me:
echo /usr/include/oracle/11.2/client/ > /etc/ld.so.conf.d/oracle_client.conf
Where can I to download the file in the item 4?
Oups, forgot to mention that.
Here is what you are looking for:
http://pecl.php.net/package/oci8