码迷,mamicode.com
首页 > 其他好文 > 详细

lnmp 下安装yaf

时间:2015-01-13 22:50:15      阅读:218      评论:0      收藏: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

标签:

原文地址:http://www.cnblogs.com/qzjpkfj/p/4222615.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!