先去官网下载安装包、解压,我把它安装在/usr/local/lib64文件夹下
cd /usr/local/lib64wget tar zxvf yaf-2.3.3.tgzcd yaf-2.3.3
2. 然后再进行编译安装
phpize./configure --with-php-config=/usr/lib/php-configmake && make install
3. 在php.ini配置里进行配置
//最好放在extension的位置extension=yaf.so//在php.ini文件末尾放置[yaf]yaf.environ = productyaf.library = NULLyaf.cache_config = 0yaf.name_suffix = 1yaf.name_separator = ""yaf.forward_limit = 5yaf.use_namespace = 0yaf.use_spl_autoload = 0
4. 然后重启服务器,查看phpinfo()是否有yaf扩展了
service httpd restart
ps:如果在编译的时候报错:make: *** [yaf_router.lo] error 1,安装pcre-devel就可以了
yum install pcre-devel