The following small series for you to share a piece of Ubuntu installed Yaf extension method, with a good reference value, I hope to be helpful to everyone. Let's take a look at it with a little knitting.
First, download
YAF Extension Download Address
Http://pecl.php.net/package/yaf
Select the package you want to download
wget Http://pecl.PHP.net/get/yaf-2.3.5.tgztar zxvf YAF-2.3.5.TGZCD yaf-2.3.5
Second, installation
#whereis phpize/data/yaf-2.3.5#/usr/bin/phpize#whereis php-configphp-config:/usr/bin/php-config/usr/share/man/ man1/php-config.1.gz/data/yaf-2.3.5#./configure--with-php-config=/usr/bin/php-config/data/yaf-2.3.5# Make & & Make Install
Workaround:
The last command may have an error: compilation terminated. Make: * [Yaf_router.lo] Error 1
sudo apt-get install libpcre3 libpcre3-dev OpenSSL Libssl-dev
Execute the last command again.
If everything goes well, it should be like this:
You can also perform the following make test
There is also the possibility of such an error: Cp:cannot create regular file '/usr/lib/php5/20121212/#INST @13121# ':P Ermission denied
This is not enough permissions, the current user is not root, you can switch to root via Su, enter the root password can be reset: sudo passwd root
Add in php.ini:
Extension=yaf.so
If you don't know where php.ini is, you can see phpinfo.
Finally, restart the server
Above this Ubuntu installs the Yaf extension the method is small to share to everybody's whole content, hoped can give everybody a reference, also hoped that everybody supports the PHP Chinese net.