Oracle DB

From DreamFactory
Jump to: navigation, search
(Bitnami Linux Install)
(Manual Install from Github on Linux)
Line 35: Line 35:
  
 
===Manual Install from Github on Linux===
 
===Manual Install from Github on Linux===
'''These instructions are Ubuntu/Debian based'''
+
'''These instructions are Ubuntu/Debian based'''===SQLSRV===
<br>
+
*DreamFactory specific instructions for Ubuntu 16.04:
'''Note:''' If you are use a newer version of the Instant Client you will want to modify these instructions accordingly (for example instant_client_12_1)
+
**[[../../../APT/Ubuntu_16.04/Modules/Oracle_DB|OCI8 on Ubuntu 16.04]]
*Download the Oracle Instant Client [http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html  here]
+
**Get both the basic client and the sdk (two files)
+
**You will need to download the appropriate version for your version of Oracle (i.e Instant Client 11 goes with Oracle 11g server.)
+
**You will also need an Oracle login for this (free registration.)
+
*Extract the instant client basic zip file to your preferred location, such as ''/opt/instantclient_11_2''
+
*Extract the sdk zip to the same location. There should be a sdk folder inside the main instantclient_11_2 folder
+
*Make a symlink from libclntsh.so.11.1 to libclntsh.so (be sure to change this to the appropriate file for your version of the client (i.e. 12.x.) You can look in the instantclient folder to see which file to use here.
+
**<source lang=bash>$ sudo ln -s /opt/instantclient_11_2/libclntsh.so.11.1 /opt/instantclient_11_2/libclntsh.so</source>
+
*Ensure that you have the php-pear and php5-dev packages installed on your system
+
**<source lang=bash>$ sudo apt-get install php-pear php-dev</source>
+
*Use PECL to install the oci8 so file.
+
**If using php 5.5 or 5.6:
+
**<source lang=bash>$ sudo pecl install oci8-2.0.11</source>
+
**if using php 7:
+
**<source lang=bash>$ sudo pecl install oci8</source>
+
**You will be asked for the type of install and location of library. Use instantclient and the location where you extracted the files above. ex: "instantclient,/opt/instantclient_11_2"
+
**If the the install generates any errors it will fail you. You will need to troubleshoot based on the error reported.
+
*Create a module file for your oci8 installation.
+
**<source lang=bash>$ sudo touch /etc/php5/mods-available/oci8.ini</source>
+
*Edit the file you just created in your preferred text editor.
+
**There is a single line in the file it looks like this:
+
**<source lang=bash>extension=oci8.so</source>
+
*Enable the php extension
+
**<source lang=bash>$ sudo php5enmod oci8</source>
+
*Restart your web service service
+
**<source lang=bash>$ sudo service apache2 restart</source>  or
+
**<source lang=bash>$ sudo service php5-fpm restart && sudo service nginx restart</source>
+

Revision as of 19:34, 27 February 2018

Drivers

Bitnami Windows Install

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 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
      ;extension=php_oci8_11g.dll
    • For Oracle Instant Client 12, the line will be denoted with a comment indicating it requires uncommenting
      ;extension=php_oci8_12c.dll  ; Use with Oracle Database 12c Instant Client
  • 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.
      ;C:\instantclient_11_2
  • Restart the system

Linux

Bitnami Linux Install

  • Download the Oracle Instant Client here
    • You will need to download the 11.2 Instant Client basic
    • You will also need an Oracle login for this (free registration.)
  • Extract the zip file to your preferred location, such as ~/instantclient_11_2
  • Edit the php.ini file (~/dreamfactory-x.x.x-x/php/php.ini)
    • Uncomment (remove the semicolon) from the line that says
      ;extension=oci8.so
  • 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.
    • 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
LD_LIBRARY_PATH=/home/user/instantclient_11_2:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
  • Edit the envvars file (/dreamfactory-2.0.2-0/apache2/bin/envvars)
    • Add the following to the end of the file and save
DYLD_FALLBACK_LIBRARY_PATH=/home/user/instantclient_11_2
  • Restart Apache

Manual Install from Github on Linux

These instructions are Ubuntu/Debian based===SQLSRV===