编译安装TFS的PHP插件

安装Boost

yum install boost-devel

安装淘宝的tair

wget http://code.taobao.org/p/tair/file/19/tair-2.3-46.el5.x86_64.rpm
rpm -ivh tair-2.3-46.el5.x86_64.rpm

如果安装失败提示libboost_thread.so.2()(64bit) is needed by tair-2.3-46.el5.x86_64,可以解压缩然后复制tair到/usr/local下

配置系统环境变量
export TFS_ROOT='/usr/local/tfs'       //tfs的安装目录
export TBLIB_ROOT='/usr/local/tblib'    //tbsys和tbnet的lib目录
export TAIR_ROOT='/usr/local/tair'     //tair的安装路径

修改phptinyclient/config.m4,在PHP_ADD_INCLUDE($TFS_ROOT/include)下面添加

PHP_ADD_INCLUDE(../new_client)
PHP_ADD_INCLUDE(../)

 

 编译phptinyclient

/usr/local/php/bin/phpize --clean
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
find ./ -name  Makefile -exec sed -i 's/\-Werror//g' {} \;
make
make install  

复制phptinyclient到/usr/local/php/extensions下

posted @ 2012-10-22 20:28  eprsoft  阅读(464)  评论(0编辑  收藏  举报