lnmp 下安装yaf

系统 1780 0

须有配置好的环境 详情见: centos6.5下yum安装lnmp(适合刚入职的新手的方法) http://www.cnblogs.com/qzjpkfj/p/4211126.html

具体安装步骤详情见:

转载自:Linux下安装php开发框架yaf    http://www.linuxde.net/2013/07/14805.html

1.下载并安装yaf扩展  http://pecl.php.net/package/yaf

    #wget http://pecl.php.net/get/yaf-2.2.9.tgz

#tar zxvf yaf-2.2.9.tgz

#cd yaf-2.2.9



[root@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



[root@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 即可解决了。

2.添加扩展配置到 PHP .ini

在/etc/php.ini文件里添加一行

    extension=yaf.so
  

重启webserver 即可。

    


lnmp 下安装yaf


更多文章、技术交流、商务合作、联系博主

微信扫码或搜索:z360901061

微信扫一扫加我为好友

QQ号联系: 360901061

您的支持是博主写作最大的动力,如果您喜欢我的文章,感觉我的文章对您有帮助,请用微信扫描下面二维码支持博主2元、5元、10元、20元等您想捐的金额吧,狠狠点击下面给点支持吧,站长非常感激您!手机微信长按不能支付解决办法:请将微信支付二维码保存到相册,切换到微信,然后点击微信右上角扫一扫功能,选择支付二维码完成支付。

【本文对您有帮助就好】

您的支持是博主写作最大的动力,如果您喜欢我的文章,感觉我的文章对您有帮助,请用微信扫描上面二维码支持博主2元、5元、10元、自定义金额等您想捐的金额吧,站长会非常 感谢您的哦!!!

发表我的评论
最新评论 总共0条评论