ubuntu下安装thrift
作者:bin目的:
使用Php通过thrift去操作hdfs
首先下载thirft
http://www.apache.org/dyn/closer.cgi?path=/thrift/0.10.0/thrift-0.10.0.tar.gz
创建目录
/usr/local/thrift
拷贝文件至/usr/local/thrift下,并且解压文件,安装
./configure --with-lua=no –prefix=/usr/local/thrift
接着make一下,(过程比较慢)
make && make install
安装php扩展
找到路径thrift/lib/php/src/ext/thrift_protocol
执行(php-config红字)
phpize ./configure -enable-thrift_protocol -with-php-config=/usr/local/php/bin/php-config
然后make
make && make install
验证
使用 php -m 查看swoole是否存在