Para realizar a conexão ao Oracle no Linux, devemos realizar os passos abaixo:
Pré-Requisitos
Passo 1 - Adicionar a arquitetura i386 e instalar os pacotes abaixo :
UBUNTU\DEBIAN | CENTOS\RHEL |
- sudo dpkg --add-architecture i386 - sudo apt-get update - sudo apt-get install libaio1:i386 - sudo apt-get install libncurses5:i386 - sudo apt-get install alien - sudo apt-get install gcc-multilib g++-multilib - sudo apt-get install libpam0g:i386 - sudo apt-get install ksh:i386 - sudo apt-get install unixodbc-dev:i386 unixodbc:i386 | - sudo yum update - sudo yum install libaio-devel.i686 - sudo yum install libaio.i686 - sudo yum install glibc.i686 - sudo yum install compat-libstdc++-33.i686 - sudo yum install glibc-devel.i686 - sudo yum install libstdc++.i686 - sudo yum install pam.i686 - sudo yum install ncurses-devel.i686 - sudo yum install unixODBC.i686 - sudo wget ftp://195.220.108.108/linux/centos/6.7/os/i386/Packages/ksh-20120801-28.el6.i686.rpm - sudo yum install ksh-20120801-28.el6.i686.rpm - sudo yum install nano |
Passo 2 - Download Instant Client Oracle :
Oracle Instant Client Basic 12.1.0.2.0-1
Oracle Instant Client Devel 12.1.0.2.0-1
Passo 3 - Download extensão PHP :
PHP 5.6
PHP 5.4
Passo 4 - Copiar a extensão para pasta ext do scriptcase :
- sudo cp oci8.so /opt/NetMake/v81/components/apache/ext/
Passo 5 - Instalar o instant Client do Oracle
UBUNTU\DEBIAN | CENTOS\RHEL |
Modificar o instalador do instant client do Oracle para .deb para ser executável : - sudo alien --target=amd64 oracle-instantclient12.1-devel-12.1.0.2.0-1.i386.rpm - sudo alien --target=amd64 oracle-instantclient12.1-basic-12.1.0.2.0-1.i386.rpm Instalar o instant client do Oracle : - sudo dpkg -i oracle-instantclient12.1-basic_12.1.0.2.0-2_amd64.deb - sudo dpkg -i oracle-instantclient12.1-devel_12.1.0.2.0-2_amd64.deb | - yum install oracle-instantclient12.1-devel-12.1.0.2.0-1.i386.rpm - yum install oracle-instantclient12.1-basic-12.1.0.2.0-1.i386.rpm |
Passo 6 - Reiniciar o apache :
- sudo /etc/init.d/apachesc81 restart