note 107603 modified in oci8.installation by danbrown

From: Date: Thu, 10 May 2012 20:40:31 +0000
Subject: note 107603 modified in oci8.installation by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-187822@lists.php.net to get a copy of this message
Spending long time in researching how to install this on a freshly installed [Red Hat-based (RHEL, CentOS, Fedora)] Linux, and finally I come to this:

1) Download & install 

#yum install oracle-instantclient-basic
#yum install oracle-instantclient-devel

or 

Download:
oci8-1.4.7.tgz
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

#rpm -i oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64.rpm
#rpm -i oracle-instantclient11.2-devel-11.2.0.3.0-1.x86_64.rpm

2) Check PHP version:

#rpm -qa | grep php

It should looks sth like this:
php-devel-5.3.10-1.w5
php-pdo-5.3.10-1.w5
php-ldap-5.3.10-1.w5
php-cli-5.3.10-1.w5
php-mysql-5.3.10-1.w5
php-5.3.10-1.w5
php-common-5.3.10-1.w5

3) Update if needed by:

#yum --enablerepo=webtatic update php

** Make sure you have php-devel installed before updating to a newer version, or you might have problem to add package back. If it happened, you\\'ll have to reinstall all php packages (sadly I did):

#yum remove php-common
#yum --enablerepo=webtatic install php

4) Remember to install a C compiler for installation use:
#yum install gcc

5) Unzip oci8-1.4.7.tgz:
#tar xvzf oci8-1.4.7

6) Run phpize (php-devel required):
# phpize

7) Setup Config:
# ./configure --with-oci8=shared,instantclient,/usr/lib/oracle/11.2/client64/lib

8) Add a sym-link to the SDK header files (Comes with the instantclient-devel)

#ln -s /usr/include/oracle/11.2/client64/ /usr/lib/oracle/11.2/client64/lib/include

** The installation defaults to use 1 dir path only, so the missing SDK files need to add back to that directory, by adding a sym-link \\"include\\" under the lib folder.

9) Compile and install:
#make all install

[Please note that I'm installing on a 64-bit platform so links are pointing at client64 instead of client] --was-- Spending long time in researching how to install this on a freshly installed Linux, and finally I come to this: 1) Download & install #yum install oracle-instantclient-basic #yum install oracle-instantclient-devel or Download: oci8-1.4.7.tgz 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 #rpm -i oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64.rpm #rpm -i oracle-instantclient11.2-devel-11.2.0.3.0-1.x86_64.rpm 2) Check PHP version: #rpm -qa | grep php It should looks sth like this: php-devel-5.3.10-1.w5 php-pdo-5.3.10-1.w5 php-ldap-5.3.10-1.w5 php-cli-5.3.10-1.w5 php-mysql-5.3.10-1.w5 php-5.3.10-1.w5 php-common-5.3.10-1.w5 3) Update if needed by: #yum --enablerepo=webtatic update php ** Make sure you have php-devel installed before updating to a newer version, or you might have problem to add package back. If it happened, you\'ll have to reinstall all php packages (sadly I did): #yum remove php-common #yum --enablerepo=webtatic install php 4) Remember to install a C compiler for installation use: #yum install gcc 5) Unzip oci8-1.4.7.tgz: #tar xvzf oci8-1.4.7 6) Run phpize (php-devel required): # phpize 7) Setup Config: # ./configure --with-oci8=shared,instantclient,/usr/lib/oracle/11.2/client64/lib 8) Add a sym-link to the SDK header files (Comes with the instantclient-devel) #ln -s /usr/include/oracle/11.2/client64/ /usr/lib/oracle/11.2/client64/lib/include ** The installation defaults to use 1 dir path only, so the missing SDK files need to add back to that directory, by adding a sym-link \"include\" under the lib folder. 9) Compile and install: #make all install [Please note that I\'m installing on a 64-bit platform so links are pointing at client64 instead of client] http://php.net/manual/en/oci8.installation.php

« previous php.notes (#187822) next »