IBM DB2 Ubuntu 16
From DreamFactory
IBM's PDO_IBM driver is required for connecting to DB2 databases and must be compiled from source. Please follow these instructions.
- Get prerequisites from Apt
- <source lang="bash">$ sudo apt-get install ksh build-essential</source>
- 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.
- Copy the downloaded tar.gz file to your home directory on the server.
- Uncompress the package and move it to
/opt/
- <source lang="bash">$ cd ~</source>
- <source lang="bash">$ tar -zxf ibm_data_server_driver_package_linuxx64_v11.1.tar.gz</source>
- <source lang="bash">$ sudo mv dsdriver /opt/</source>
- Run the dsdriver installer
- <source lang="bash">$ cd /opt/dsdriver</source>
- <source lang="bash">$ sudo chmod +x installDSDriver</source>
- <source lang="bash">$ sudo ksh installDSDriver</source>
- Symlink the include directory
- <source lang="bash">$ sudo ln -s /opt/dsdriver/include /include</source>
- Get the DF Patched version of the PDO_IBM Source
- <source lang="bash">$ cd ~</source>
- <source lang="bash">$ git clone https://github.com/dreamfactorysoftware/PDO_IBM-1.3.4-patched.git</source>
- Compile and install the driver
- <source lang="bash">$ cd PDO_IBM-1.3.4-patched</source>
- <source lang="bash">$ phpize</source>
- <source lang="bash">$ ./configure --with-pdo-ibm=/opt/dsdriver/lib</source>
- <source lang="bash">$ make</source>
- <source lang="bash">$ sudo make install</source>
- Enable the driver in PHP
- <source lang="bash">$ sudo nano /opt/bitnami/php/etc/php.ini</source>
- Locate the line that says
;extension=pdo_ibm.so
- Uncomment it by removing the semicolon (;)
extension=pdo_ibm.so