wdcp环境php安装yaf扩展

CentOS release 6.5 (Final) 64位
wdCP v3.0.8

准备工作:

确定系统已经安装了gcc、gcc-c++、make、automake、autoconf等依赖库,如果之前装好了PHP那么这些依赖应该都有了,推荐用yum管理安装php环境。

可以获取到yaf包的途径:

1 Yaf其实算是PHP官方的一个扩展,我们可以直接在PHP官网下载。 http://pecl.php.NET/package/yaf

2 Git 仓库 https://github.com/laruence/php-yaf

yaf官方文档 :http://www.laruence.com/manual/

安装:

从官网下载的新一点的版本会比较稳定,安装也会比较顺畅,老版本有时候安到半截如果你的环境配的不全或者路径有问题,需要做一些调试,,我们这里下载官网的最新2.3.3

1
2
3
4
5
wget http://pecl.php.net/get/yaf-2.3.3.tgz
tar -zxvf yaf-2.3.3* && cd yaf-2.3.3
/www/wdlinux/php/bin/phpize
./configure --with-php-config=/usr/bin/php-config && make && make test
make install

期间安装2.2.9版本出现 yaf_config.lo 错误
/yaf-2.2.9/yaf_config.c:227: error: ?.S_CONSTANT_ARRAY?.undeclared (first use in this function) make: *** [yaf_config.lo] Error

3.0.4版本也出现错误,不知是没有 make && make test 还是版本的原因。

不过2.3.3安装成功了。