Reducing diskspace of your Oracle Instant Client install

Most PHP OCI8 users link PHP with the Oracle Instant Client (IC) libraries that handle the underlying "client" (i.e PHP OCI8 extension) communication with the database. IC is relatively small for the features it gives, and is very easy to install. A ZIP or RPM download unpacks a few libraries.

Despite hearing the "disk is cheap" mantra most of my professional life, sometimes less is more, such as when it comes to reducing deployment and backup costs. Although IC isn't particularly big - and it's getting relatively smaller all the time - there are two ways to reduce its size:

1. Use the Basic Lite instead of Basic package. This is much smaller because it only supports common character sets and only has English error messages.

2. Remove the JDBC, ODBC and OCCI libraries. These libraries are not needed by PHP OCI8.

The IC Basic package libraries needed for PHP OCI8 are given in table 1-3 of the OCI Manual:

On Linux:

libclntsh.so.11.1
libnnz11.so
libociei.so

Or on Windows:
oci.dll
oraociei11.dll
orannzsbb11.dll

The IC Basic Lite package libraries needed for PHP OCI8 are given in table 1-5 of the OCI manual:

On Linux:

libclntsh.so.11.1
libnnz11.so
libociicus.so

Or on Windows:

oci.dll
oraociicusll.dll
orannzsbb11.dll

If using the ZIP files on Linux, don't forget to create the symbolic link:

ln -s libclntsh.so.11.1 libclntsh.so

before building PHP OCI8.

Comments:

Excellent write up, thanks for helping with the basic installation.

Posted by Brian on May 25, 2009 at 10:40 PM PDT #

Post a Comment:
Comments are closed for this entry.
About

Tourists looking out over an Opal mine
I work in the Linux Engineering team at Oracle, espousing the Oracle-PHP-Apache-Linux ("OPAL") stack. I also assist with Python, Perl and Ruby.
Email: christopher.jones@oracle.com
Twitter: http://twitter.com/ghrd
Book: Free PHP Oracle book
Download: PHP Linux RPMs with the OCI8 extension
Links: OTN PHP Developer Center

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today