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)
- download the rpm’s for the oracle instant client (basic & sdk) from http://www.oracle.com/technetwork/topics/linux-amd64-093390.html
- copy the rpm’s to your server and install them (sudo rpm -i filename.rpm)
- sudo yum install php-devel
-
- You’ll need this for phpize
- sudo yum install php-pear gcc
- sudo pecl install oci8
- 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] :”
- Note the last line “You should add “extension=oci8.so” to php.ini”
- create a file /etc/php.d/oci8.ini with the contents: extension=oci8.so, see other files in this directory as examples
- sudo service httpd restart