須有配置好的環(huán)境 詳情見: centos6.5下yum安裝lnmp(適合剛?cè)肼毜男率值姆椒? http://www.cnblogs.com/qzjpkfj/p/4211126.html
具體安裝步驟詳情見:
轉(zhuǎn)載自:Linux下安裝php開發(fā)框架yaf??? http://www.linuxde.net/2013/07/14805.html
1.下載并安裝yaf擴(kuò)展 ?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 運(yùn)行的是空的,我配置就是;是因?yàn)閜hpize沒安;一條命令安裝: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 (如果提示錯(cuò)誤: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 如果執(zhí)行出錯(cuò)如下)
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 ‘=’, ‘,’, ‘;’, ‘a(chǎn)sm’ or ‘__attribute__’ before ‘*’ token
/usr/include/php/ext/pcre/php_pcre.h:46: error: expected ‘=’, ‘,’, ‘;’, ‘a(chǎn)sm’ or ‘__attribute__’ before ‘*’ token
/usr/include/php/ext/pcre/php_pcre.h:52: error: expected specifier-qualifier-list before ‘pcre’
make: *** [yaf_router.lo] 錯(cuò)誤 1
解決辦法
# yum install pcre-devel? 安裝 ? pcre-devel 即可解決了。
2.添加擴(kuò)展配置到 PHP .ini
在/etc/php.ini文件里添加一行
extension=yaf.so
重啟webserver 即可。
更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主
微信掃碼或搜索:z360901061

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