Install Oracle Instant Client

Download Oracle Instant Client packages

First, select right client for your OS here(http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html),
Instant Client for Linux x86-64(http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html) in my case for my 64-bit Ubuntu 14.04.
Then Accept License Agreement and download basic & devel rpm packages for your Oracle version.
Our Oracle DB version is 11g r2, so I need to download:


Install the instant client

Convert .rpm to Debian software package (.deb) using alien:

sudo apt-get install alien
sudo alien -d oracle-instantclient11.2-basic-
sudo alien -d oracle-instantclient11.2-devel-

This will output oracle-instantclient11.2-basic- & oracle-instantclient11.2-devel- which can be installed via Ubuntu’s dpkg command:

sudo dpkg -i oracle-instantclient11.2-basic_11.
sudo dpkg -i oracle-instantclient11.2-devel_11.

After successful installation, client library with be installed in /usr/share/oracle/11.2/client64, and developer header files with be in /usr/include/oracle/11.2/client64.

Continue reading “Ubuntu下安装支持Oracle的PHP扩展”