Friday, June 6, 2014

Install PHP ibm_db2 extension in Linux (redHat)

Install PHP ibm_db2 extension in Linux (redHat) to make sb2_connect function worinkg in Linux:
1) check Linux version
uname -a
 uname -m
2) Go to ibm db2 download website to Download Data Server Driver Package

fix pack: DSClients-linuxx64-dsdriver-

IBM Data Server Driver Package (Linux/x86-64 64 bit) V10.5 Fix Pack 3
This is for PHP5.3
3) sudo mkdir /opt/ibm
cd /opt/ibm

download v10.5fp3_linuxx64_dsdriver.tar.gz

and upload to /opt/ibm
4) sudo tar -xvf v10.5fp3_linuxx64_dsdriver.tar.gz
cd /opt/ibm/dsddriver
sudo chmod 755 installDSDriver
5) Install ksh
sudo yum install ksh
6) Install ibm_db2 driver
sudo ksh installDSDriver
7) To make  phpize working which is needed for sudo pecl install ibm_db2
sudo yum install php-devel
8) sudo pecl install ibm_db2
export IBM_DB_HOME=/opt/ibm/dsdriver
sudo pecl install ibm_db2
9) in db2 install directory message, enter
10) return result
Build process completed successfully
Installing '/usr/lib64/php/modules/'
install ok: channel://
configuration option "php_ini" is not set to php.ini location
You should add "" to php.ini

11)  locate php.ini
 sudo vi  /etc/php.ini
13) Restart Apache
 sudo service httpd restart


No comments:

Post a Comment