Oracle
Installing Oracle is easy. You can follow this tutorial by David Ghedini in installing Oracle 11g Express.
Development packages
InstantClient
Download Oracle InstantClient RPM files here. Put these files in your server. Download the basic and devel packages.
- Basic: oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64.rpm
- Devel: oracle-instantclient11.2-devel-11.2.0.3.0-1.x86_64.rpm
Install the downloaded rpm files:
Create a file inside
/etc/profile.d
named oracle.sh
and put this as the content:
And run it so we’ll have
LD_LIBRARY_PATH
as an environment variable.PDO_OCI
Download the PDO_OCI source using
pecl
.
Inside the
PDO_OCI-1.0
folder, edit the file named config.m4
.
Find a pattern like this near line
10
and add these 2 lines:
Find a pattern like this near line
101
and add these lines:
Build and install the extension.
To enable the extension, add a file named
pdo_oci.ini
under /etc/php.d
and put this as the content:
Validate that it was successfully installed.
You should see something like this in the output:
OCI8
Download the OCI8 source using
pear
Build and install the extension.
To enable the extension, add a file named
oci8.ini
in /etc/php.d
with this content:
Validate that it was successfully installed.
You should see something like this:
Finishing up
Do not forget to restart your web server (e.g. Apache). You can double check with
phpinfo()
if the extensions were successfully installed.