Oracle DB

From DreamFactory
Jump to: navigation, search

This module will allow you to access Oracle databases. These instructions assumes you are installing with the latest Oracle instant client (12.1) which is backwards compatible to Oracle 10. If you need compatibility back to Oracle 9, use the 11.2 instant client files from Oracle, and adjust the filenames in the instructions accordingly.

  1. Get the prerequisites
    • $ sudo yum install php71w-devel php71w-pear libaio-devel
    • $ sudo yum groupinstall 'Development Tools'
  2. Get the Instant Client Files
    • Download the basic and sdk instant client files for Linux x86-64, version 12.1 from this link: Oracle Instant Client Downloads
    • Filenames:
  3. Copy the instant client files to your home directory (~) on the server
  4. Unzip and move the files to /opt/instantclient_12_1
    • $ cd ~
    • $ unzip
    • $ unzip
    • $ sudo mv instantclient_12_1 /opt/
  5. Create a symlink for the .so in the instantclient directory
    • $ sudo ln -s /opt/instantclient_12_1/ /opt/instantclient_12_1/
  6. Install the oci8 driver using PECL
    • $ sudo pecl install oci8
    • When asked for the ORACLE_HOME directory during install type instantclient,/opt/instantclient_12_1
    • You should see a message indicating that the was successfully installed to the extensions directory
  7. Create the ini files
    • $ sudo sh -c 'echo "" > /etc/php.d/oci8.ini'
  8. Restart PHP-FPM or Apache (whichever solution you're using.)