Sei sulla pagina 1di 2

Habilitar PHP con Soporte de Oracle para oci8 in RHEL /

CentOS 5.5/ Scientific Linux -x86_64


Instalar php, php-devel, httpd , inciar los servicios
1. Descargar oracle instant client (basic and devel) desde :

http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxsoft.html

Archivos :

oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64.rpm
oracle-instantclient11.2-deel-11.2.0.3.0-1.x86_64.rpm

2..Instalar paquetes basic y development.

[andres.jaramillo@test-srv03] rpm -ivh oracle-instantclient-basic-11.2.0.3.0-1.x86_64.rpm


[andres.jaramillo@test-srv03] rpm -ivh oracle-instantclient-devel-11.2.0.3.0-1.x86_64.rpm

3. Link de la instalacin dinmica

[andres.jaramillo@test-srv03 ] echo /usr/lib/oracle/11.2/client64/lib/ > /etc/ld.so.conf.d/oracle_client.conf


[andres.jaramillo@test-srv03] ldconfig -v

4. Descargar paquete oci8 desde http://pecl.php.net/package/oci8

[andres.jaramillo@test-srv03] wget http://pecl.php.net/get/oci8-1.4.7.tgz

5. Extraer e instalar el paquete

[andres.jaramillo@test-srv03]
[andres.jaramillo@test-srv03]
[andres.jaramillo@test-srv03]
[andres.jaramillo@test-srv03]
[andres.jaramillo@test-srv03]
[andres.jaramillo@test-srv03]

tar -zxvf oci8-1.4.7.tgz


cd oci8-1.4.7
phpize
./configure -with-oci8=shared,instantclient,/usr/lib/oracle/11.2/client64/lib/
make
make install

6. Agregar la libreira compratida en PHP

[andres.jaramillo@test-srv03] echo extension=oci8.so > /etc/php.d/oci8.ini

7. Reiniciar Apache

/etc/init.d/httpd restart

8. Revisar que este cargado y habilitado el modulo

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

9, Crear en el archivo phpdata.php en /dataapp/


<?php
phpinfo();
?>

En caso de tener incovenientes revisar SElinux y desabilitar:


[andres.jaramillo@test-srv03] setenforce 0 (revisar que se encuentre permisivo )
[andres.jaramillo@test-srv03] sestatus
SELinux status:
enabled
SELinuxfs mount:
/selinux
Current mode:
permissive
Mode from config file:
enforcing
Policy version:
24
Policy from config file:
targeted

Potrebbero piacerti anche