IBM DB2

From DreamFactory
Jump to: navigation, search
(Created page with "IBM's PDO_IBM driver is required for connecting to DB2 databases and must be compiled from source. Please follow these instructions. # Get the dsdriver package from IBM. #* Y...")
 
Line 24: Line 24:
 
#* <source lang="bash">$ ./configure --with-pdo-ibm=/opt/dsdriver/lib</source>
 
#* <source lang="bash">$ ./configure --with-pdo-ibm=/opt/dsdriver/lib</source>
 
#* <source lang="bash">$ make</source>
 
#* <source lang="bash">$ make</source>
#* <source lang="bash">$ sudo make install</source>
+
 
 +
After running '''make''' you'll find a new directory named '''modules''' inside the '''PDO_IBM-1.3.4-patched''' directory. Inside this '''modules''' directory you'll find a file named '''pdo_ibm.so'''. Copy that file into your Bitnami installation's '''/php/lib/php/extensions/''' directory.
 +
 
 
# Enable the driver in PHP
 
# Enable the driver in PHP
 
#* <source lang="bash">$ sudo nano /opt/bitnami/php/etc/php.ini</source>
 
#* <source lang="bash">$ sudo nano /opt/bitnami/php/etc/php.ini</source>
 
#* Locate the line that says <code>;extension=pdo_ibm.so</code>
 
#* Locate the line that says <code>;extension=pdo_ibm.so</code>
 
#* Uncomment it by removing the semicolon (;)  <code>extension=pdo_ibm.so</code>
 
#* Uncomment it by removing the semicolon (;)  <code>extension=pdo_ibm.so</code>

Revision as of 19:37, 21 May 2018

IBM's PDO_IBM driver is required for connecting to DB2 databases and must be compiled from source. Please follow these instructions.

  1. Get the dsdriver package from IBM.
    • You can download the package from here. Grab the Linux 64 bit package.
    • This download requires you to register for a free account with IBM.
  2. Copy the downloaded tar.gz file to your home directory on the server.
  3. Uncompress the package and move it to /opt/
    • $ cd ~
    • $ tar -zxf ibm_data_server_driver_package_linuxx64_v11.1.tar.gz
    • $ sudo mv dsdriver /opt/
  4. Run the dsdriver installer
    • $ cd /opt/dsdriver
    • $ sudo chmod +x installDSDriver
    • $ sudo apt-get install ksh
    • $ sudo ksh installDSDriver
  5. Symlink the include directory
    • $ sudo ln -s /opt/dsdriver/include /include
  6. Get the DF Patched version of the PDO_IBM Source
    • $ cd ~
    • $ git clone https://github.com/dreamfactorysoftware/PDO_IBM-1.3.4-patched.git
  7. Compile and install the driver
    • $ cd PDO_IBM-1.3.4-patched
    • $ phpize
    • $ ./configure --with-pdo-ibm=/opt/dsdriver/lib
    • $ make

After running make you'll find a new directory named modules inside the PDO_IBM-1.3.4-patched directory. Inside this modules directory you'll find a file named pdo_ibm.so. Copy that file into your Bitnami installation's /php/lib/php/extensions/ directory.

  1. Enable the driver in PHP
    • $ sudo nano /opt/bitnami/php/etc/php.ini
    • Locate the line that says ;extension=pdo_ibm.so
    • Uncomment it by removing the semicolon (;) extension=pdo_ibm.so