第一步:先安装freetds及相关库
yum install freetds freetds-devel yum install php-devel yum install gcc yum install re2c
第二步:下载php源码及编译php_dblib扩展
wget http://cn2.php.net/get/php-5.4.32.tar.bz2/from/this/mirror tar jxvf php-5.4.32.tar.bz2 cd php-5.4.32/ext/pdo_dblib/ phpize ./configure --with-libdir=lib64 make make install
第三步:载入PHP的sybase扩展
cd /etc/php.d vim pdo_dblib.ini extension=pdo_dblib.so