#wget http://pecl.php.net/get/yaf-2.2.9.tgz
#tar zxvf yaf-2.2.9.tgz
#cd yaf-2.2.9
[iyunv@bogon yaf-2.2.9]# whereis phpize
phpize: /usr/bin/phpize /usr/share/man/man1/phpize.1.gz (有可能 whereis phpize 运行的是空的,我配置就是;是因为phpize没安;一条命令安装:yum install php-devel)
/usr/bin/phpize
[iyunv@bogon yaf-2.2.9]# /usr/bin/phpize
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
#whereis php-config
php-config: /usr/bin/php-config /usr/share/man/man1/php-config.1.gz
#./configure --with-php-config=/usr/bin/php-config (如果提示错误:configure: error: in `/root/yaf-2.2.9':configure: error: no acceptable C compiler found in $PATHSee `config.log' for more details. 说明没安装gcc 一条命令安装 yum -y install gcc)
#make && make install
(make && make install 如果执行出错如下)
In file included from /root/yaf-2.1.2/yaf_router.c:28:
/usr/include/php/ext/pcre/php_pcre.h:29:18: error: pcre.h: No such file or directory
In file included from /root/yaf-2.1.2/yaf_router.c:28:
/usr/include/php/ext/pcre/php_pcre.h:45: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
/usr/include/php/ext/pcre/php_pcre.h:46: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
/usr/include/php/ext/pcre/php_pcre.h:52: error: expected specifier-qualifier-list before ‘pcre’
make: *** [yaf_router.lo] 错误 1
解决办法
# yum install pcre-devel 安装 pcre-devel即可解决了。