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
-
$ sudo apt-get install ksh build-essential php7.1-dev
-
- 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/
-
$ cd ~
-
$ tar -zxf ibm_data_server_driver_package_linuxx64_v11.1.tar.gz
-
$ sudo mv dsdriver /opt/
-
- Run the dsdriver installer
-
$ cd /opt/dsdriver
-
$ sudo chmod +x installDSDriver
-
$ sudo ksh installDSDriver
-
- Symlink the include directory
-
$ sudo ln -s /opt/dsdriver/include /include
-
- Get the DF Patched version of the PDO_IBM Source
-
$ cd ~
-
$ git clone https://github.com/dreamfactorysoftware/PDO_IBM-1.3.4-patched.git
-
- Compile and install the driver
-
$ cd PDO_IBM-1.3.4-patched
-
$ phpize
-
$ ./configure --with-pdo-ibm=/opt/dsdriver/lib
-
$ make
-
$ sudo make install
-
- Enable the driver in PHP
-
$ sudo sh -c 'echo "extension=pdo_ibm.so" > /etc/php/7.1/mods-available/pdo_ibm.ini'
-
$ sudo phpenmod pdo_ibm
-
- Confirm proper php installation with
-
$ php -m | grep pdo_ibm
-
- Restart the PHP-FPM and Nginx or Restart Apache (whichever solution you're using.)
- Nginx
-
$ sudo service php7.1-fpm restart && sudo service nginx restart
-
- Apache
-
$ sudo service apache2 restart
-
- Nginx