須有配置好的環境 詳情見: 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 即可。
更多文章、技術交流、商務合作、聯系博主
微信掃碼或搜索:z360901061

微信掃一掃加我為好友
QQ號聯系: 360901061
您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。
【本文對您有幫助就好】元
