#php-vphp 7.0.19 (CLI) (Built:may 21:01:27) (NTS) Copyright (c) 1997-2017 the PHP groupzend Engine v3.0.0, Copy Right (c) 1998-2017 Zend Technologies
#nginx-vnginx version:nginx/1.12.0
CentOS Linux release 7.2.1511 (Core)
The premise of this article is that the PHP7.0+NGINX environment has been built.
1, first download YAF source package, to Http://pecl.php.net/package/yaf, download, 3.0. More than 2 needs php7.0 above.
Let's use the command to download the 3.0.4 stable version of the source package
Wgte http://pecl.php.net/get/yaf-3.0.4.tgz
2. Decompression
TAR-XVF yaf-3.0.4.tgz
3. Install the Php-devel expansion pack. Install the Php-devel required for 7.0. Default yum install php-devel the corresponding PHP version is 5.3. This is also a difference of 7.0.
Yum Install Php70w-devel
4. Enter the YAF installation directory
Phpize./coufiguremakemake Install
There will be some problems, such as the lack of C compiler, etc., can be self-search solution.
5, configuration php.ini. Add the following sentence to the php.ini
extension=yaf.so;
6, php-m See there is no yaf frame.
7. Restart PHP-FPM
Service php-fpm Restart.
The YAF framework is now complete.
Next we can use the Code generation tool to generate a YAF demo.
1, to HTTPS://GITHUB.COM/LARUENCE/YAF download Zip compressed package, to our server.
2. Enter the YAF directory TOOLS/CG
3, then /usr/local/php/bin/php YAF_CG Sample. Sample is the name of the application we generate.
4, put the sample folder to the Nginx site root directory
/data/www/sample
5. Visit locahost/sample
Appear
Hello world! I am Stranger
Success!
Reference
: Https://stackoverflow.com/questions/12325109/cant-install-php-devel-on-centos
Http://www.th7.cn/Program/php/201507/507424.shtml
Http://www.cnblogs.com/tomkissing/p/6250530.html
Http://www.cnblogs.com/findgor/p/4086502.html
CENTOS PHP 7.0 +nginx Environment Installation YAF Framework