Ad Widget

Collapse

Building php-oci8 RPM on CentOS-5

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • BDiE8VNy
    Senior Member
    • Apr 2010
    • 680

    #1

    Building php-oci8 RPM on CentOS-5

    If one want to use an Oracle database as backend one need to have ZABBIX compiled with Oracle support which is described here:


    Because the ZABBIX web interface is PHP driven one need to have support for Oracle in PHP as well.
    In my opinion the most convenient way is to have one RPM providing oracle support as module suitable to the stock PHP RPMs.

    This thread describes how to build a php-oci8 RPM from the CentOS-5 stock SRPM for an i386 architecture.

    1. Get/install the latest SRPM of PHP (version was current on thread creation) on Your rpm-build host
    Code:
    # rpm -ivh http://mirror.centos.org/centos/5/updates/SRPMS/php-5.1.6-27.el5_5.3.src.rpm
    2. Get and install the following RPMs from Oracle (http://www.oracle.com/technetwork/to...ft-082809.html)
    • oracle-instantclient11.2-basic-11.2.0.2.0-1
    • oracle-instantclient11.2-devel-11.2.0.2.0-1


    3. Apply the attached patch (php.spec-oci8.patch)
    Code:
    # patch -p0 < /tmp/php.spec-oci8.patch
    4. The following modificatios are neccessary to enable the rebuild of PHP with the latest Oracle Instant Client
    Code:
    # ln -s libocci.so.11.1 /usr/lib/oracle/11.2/client/lib/libocci.so.10.1
    # ln -s libclntsh.so.11.1 /usr/lib/oracle/11.2/client/lib/libclntsh.so.10.1
    # mv /usr/include/oracle/11.2/client/ldap.h /usr/include/oracle/11.2/client/ldap.h.IGNORE
    5. Build the PHP RPMs
    Code:
    # rpmbuild -ba --clean /usr/src/redhat/SPECS/php.spec
    If the build process ends successfully You should find an additional RPM which can be installd beside the stock PHP RPMs:
    /usr/src/redhat/RPMS/i386/php-oci8-5.1.6-27.el5_5.3.i386.rpm

    I've written the steps out of my mind and haven't redone it yet. So it may be that I forget something.
    Attached Files
Working...