http://www.ibm.com/developerworks/data/library/techarticle/dm-0606bombardier/

http://linuxconfig.org/apache-webserver-httpd-service-installation-on-redhat-7-linux

By default the port 80 is blocked so we need to change firewall rules to enable http port:

# firewall-cmd --zone=public --add-port=80/tcp --permanent
# firewall-cmd --reload

 

 httpd-2.2.0.tar.gz   PDO_INFORMIX-1.3.1.tar   php-5.6.11.tar

 

cd /usr/local/src/httpd-2.2.0/

./configure \
--prefix=/usr/local/apache \
--enable-shared=max \
--enable-module=rewrite \
--enable-module=so

make
make install

/usr/local/apache/conf/httpd.conf
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
ServerName 172.31.102.111:80
User informix
Group informix

cd /usr/local/src/php-5.6.11/ext
cp -R ../../PDO_INFORMIX-1.3.1  pdo_informix

cd /usr/local/src/php-5.6.11

./buildconf --force

REDHAT 6.5 do : ./configure --with-apxs2=/usr/local/apache/bin/apxs \ --disable-debug \ --disable-ftp \ --disable-inline-optimization \ --disable-magic-quotes \ --disable-mbstring \ --enable-wddx=shared \ --enable-xml \ --with-dom \ --with-regex=system \ --with-xml \ --with-jpeg-dir=/usr/lib \ --with-zlib-dir=/usr/lib \ --with-zlib \ --without-pdo-sqlite \ --without-iconv \ --without-sqlite \ --enable-shared \ --enable-pdo \ --with-pdo-informix=/opt/informix


===============================
http://stackoverflow.com/questions/610940/install-php-5-without-libxml2

REDHAT 7.0 do (因為 libxml2 找不到)

http://www.linuxfromscratch.org/blfs/view/svn/general/php.html
download libxml2-2.9.2 and Python-3.4.3
Python: ./configure ; make ; make install
libxml2 : ./configure --with-python=/usr/local/include/python3.4m ; make ; make install ;


./configure --with-apxs2=/usr/local/apache/bin/apxs \
--disable-debug \
--disable-ftp \
--disable-inline-optimization \
--disable-mbstring \
--enable-wddx=shared \
--enable-xml \
--with-regex=system \
--with-jpeg-dir=/usr/lib \
--without-pdo-sqlite \
--without-iconv \
--enable-shared \
--enable-pdo \
--with-pdo-informix=/opt/informix

但是找不到 pdo.so 正在處理 .....沒關係 , 沒有 pdo.so 照樣可以執行 informix

    try{
        $db = new PDO("informix:host=128.110.x.x; service=4567;database=marsdb; server=ifx2; protocol=onsoctcp;",
        "informix", "ykpang");
    }catch(PDOException $e) {
        echo $e->getMessage();
        die() ;
    }

===============================

make
make install
cp php.ini-production /usr/local/lib/php.ini


php -m  to see what ok 

cd PDO_INFORMIX-1.3.1
phpize
./configure
make

cp pdo_informix.so , pdo.so to /usr/local/lib/php/extensions/no-debug-non-zts-20131226

ls -l
-rwxr-xr-x. 1 root root 587256 Aug 28 15:32 opcache.so
-rwxr-xr-x. 1 root root 152218 Aug 28 15:36 pdo_informix.so
-rwxr-xr-x. 1 root root 102456 Aug 28 15:37 pdo.so
-rwxr-xr-x. 1 root root 138440 Aug 28 15:32 wddx.so

/usr/local/lib/php.ini
extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20131226/"

#以下兩行做了就錯 !!!
extension=pdo.so
extension=pdo_informix.so
 
<?php
    try{
        $db = new PDO("informix:host=128.110.x.x; service=4567;database=marsdb; server=ifx2; protocol=onsoctcp;",
        "informix", "ykpang");
    }catch(PDOException $e) {
        echo $e->getMessage();
        die() ;
    }
print "Connection Established!\n\n";
$stmt = $db->query("select * from test_table");
$res = $stmt->fetch( PDO::FETCH_BOTH );
$rows = $res[0];
echo "Table contents: $rows.\n";
?>



Note : 加上 extension = pdo.so 兩行 , php 執行不出來,php -m 也是 , 原因不明 !!








/usr/local/lib/php.ini













 

創作者介紹
創作者 hedgezzz 的頭像
hedgezzz

hedgezzz的部落格

hedgezzz 發表在 痞客邦 留言(0) 人氣()