Oracle DB Installation

From DreamFactory
Jump to: navigation, search
DreamFactoryInstallationDatabasesOracle DB Installation
(Manual Install from Github on Linux)
Line 1: Line 1:
==Drivers==
+
== Driver ==
===Bitnami Windows Install===
+
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.
'''Note:''' These instructions are applicable for DreamFactory 2.1.0-4 and older. Starting in DreamFactory 2.1.1 you will need to use Oracle Instant Client 12
+
*Download the Oracle Instant Client [http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html  here]
+
**You will need to download the appropriate version for your version of Oracle (i.e Instant Client 11 goes with Oracle 11g server.)
+
**Since the Windows Bitnami stack is only 32-bit you need to download the 32-bit instant client
+
**You will also need an Oracle login for this (free registration.)
+
*Extract the zip file to your preferred location, such as C:\instantclient_11_2
+
*Edit the php.ini file (''C:\Bitnami\dreamfactory-x.x.x-x\php\php.ini'')
+
**Uncomment (remove the semicolon) from the line that says <source lang=bash>;extension=php_oci8_11g.dll</source>
+
**For Oracle Instant Client 12, the line will be denoted with a comment indicating it requires uncommenting <source lang=bash>;extension=php_oci8_12c.dll  ; Use with Oracle Database 12c Instant Client </source>
+
*Edit your PATH variable.
+
**Go to Control Panel->System->Advanced System Settings
+
**Click on Environment Variables
+
**Under System variables, double click on Path.
+
**At the end of the Variable value, add the path to the instant client directory (see above.) Use a semicolon to separate this new entry from the current last entry. <source lang=bash>;C:\instantclient_11_2</source>
+
*Restart the system
+
  
==Linux==
+
=== Requirements ===
===Bitnami Linux Install===
+
* You will need the following items from your package manager (linux)
*Download the Oracle Instant Client [http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html here]
+
** PHP Pear and PHP Dev (for PECL)
**You will need to download the 11.2 Instant Client basic
+
** Development tools / (e.g. Build Essential tools)
**You will also need an Oracle login for this (free registration.)
+
** libaio1
*Extract the zip file to your preferred location, such as ''~/instantclient_11_2''
+
* For Windows you will just need an oci8 dll file from PHP PECL (or from Bitnami)
*Edit the php.ini file (''~/dreamfactory-x.x.x-x/php/php.ini)''
+
* Oracle Instant Client Files
**Uncomment (remove the semicolon) from the line that says <source lang=bash>;extension=oci8.so</source>
+
** Download the basic and sdk instant client files: [http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html Oracle Instant Client Downloads]
*Edit the setenv.sh file ( ''~/dreamfactory-2.0.2-0/scripts/setenv.sh'' ) '''Note:''' Paths specified are user supplied and specific to your environment. Please make corresponding changes if required.
+
** Example Filenames:
**Add the following to the end of the file and save, just before the line that says  ''. /home/user/dreamfactory-2.0.2-0/scripts/build-setenv.sh'' add
+
*** instantclient-basic-linux.x64-12.1.0.2.0.zip
<source lang=bash>LD_LIBRARY_PATH=/home/user/instantclient_11_2:$LD_LIBRARY_PATH
+
*** instantclient-sdk-linux.x64-12.1.0.2.0.zip
export LD_LIBRARY_PATH</source>
+
*Edit the envvars file (''/dreamfactory-2.0.2-0/apache2/bin/envvars'')
+
**Add the following to the end of the file and save
+
<source lang=bash>DYLD_FALLBACK_LIBRARY_PATH=/home/user/instantclient_11_2</source>
+
*Restart Apache
+
  
===Manual Install from Github on Linux===
+
=== Driver Install ===
'''These instructions are Ubuntu/Debian based'''===SQLSRV===
+
* In Linux you will need to use PECL to build the oci8 module, pointing to the unzipped instant client files as the library. Then enable the module in PHP.
*DreamFactory specific instructions for Ubuntu 16.04:
+
* In Windows you will need to add the unzipped instant client files to your PATH variable and restart the machine. Then enable the module in PHP.
**[[../../../APT/Ubuntu_16.04/Modules/Oracle_DB|OCI8 on Ubuntu 16.04]]
+
 
 +
For concrete examples, see the [[../../../APT/Ubuntu_16.04/Modules/Oracle_DB| Ubuntu 16.04]] instructions or the [[../../../Bitnami_Windows/Modules/Oracle_DB| Bitnami Windows]] instructions.

Revision as of 18:40, 28 February 2018

Driver

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.

Requirements

  • You will need the following items from your package manager (linux)
    • PHP Pear and PHP Dev (for PECL)
    • Development tools / (e.g. Build Essential tools)
    • libaio1
  • For Windows you will just need an oci8 dll file from PHP PECL (or from Bitnami)
  • Oracle Instant Client Files
    • Download the basic and sdk instant client files: Oracle Instant Client Downloads
    • Example Filenames:
      • instantclient-basic-linux.x64-12.1.0.2.0.zip
      • instantclient-sdk-linux.x64-12.1.0.2.0.zip

Driver Install

  • In Linux you will need to use PECL to build the oci8 module, pointing to the unzipped instant client files as the library. Then enable the module in PHP.
  • In Windows you will need to add the unzipped instant client files to your PATH variable and restart the machine. Then enable the module in PHP.

For concrete examples, see the Ubuntu 16.04 instructions or the Bitnami Windows instructions.