Monday, December 12, 2005

RHEL 4: php_oci8

I've got a new box with RHEL 4 pre-installed. I got that brand new box for a new project. This particular project will use Oracle as the database engine. It will also use PHP for the front-end.

The classic problem for the Oracle+PHP is that the PHP must be recompiled to include the Oracle Extension. In the past, I would've opted the compiled from source approach. But for this one, I've tried and succeded using the rebuild RPM approach.

Here's a list what I've done:

  1. install the Oracle 9i on top RHEL 4
  2. download the PHP Source RPM from ftp://ftp.redhat.com/
  3. rename gcc.orig, created after installing compat-gcc package (required to install Oracle 9i on top RHEL 4), to gcc
  4. do the rpm --rebuild
  5. install php_oci8 package using rpm -Uvh --nodeps, so it will not complain about missing oracle client library
  6. set up the ORACLE_HOME and LD_LIBRARY_PATH for the root environment
And the whole thing just fall into the intended places.:D

1 comment:

Anonymous said...

cool
ini djaka, test comment, please be more detail on steps that u explain (hehehe....bener ga sih commentnya)