This is similar to my post on how to do this on Ubuntu, but it’s a little different but a lot easier on Redhat (don’t tell anyone i said that)

  1. download the rpm’s for the oracle instant client (basic & sdk) from http://www.oracle.com/technetwork/topics/linux-amd64-093390.html
  2. copy the rpm’s to your server and install them (sudo rpm -i filename.rpm)
  3. sudo yum install php-devel
    • You’ll need this for phpize
  4. sudo yum install php-pear gcc
  5. sudo pecl install oci8
    1. use default for “Please provide the path to the ORACLE_HOME directory. Use ‘instantclient,/path/to/instant/client/lib’ if you’re compiling with Oracle Instant Client [autodetect] :”
    2. Note the last line “You should add “extension=oci8.so” to php.ini”
  6. create a file /etc/php.d/oci8.ini with the contents: extension=oci8.so, see other files in this directory as examples
  7. sudo service httpd restart