首先来到 php官网,然后选择下载,
wget http://cn2.php.net/get/php-7.1.1.tar.gz/from/this/mirror
这里的wget下载的是当前目录,就是你当前在哪就下载到哪.
下载的是php-7.1.1.tar.gz
用tar命令解压
tar -zxvf php-7.1.1.tar.gz
解压得到php-7.1.1目录,cd php-7.1.1进去这个目录
引用块内容
讲一下fpm功能将所有的响应数据刷新到客户端
官网解释是这样的
FPM (FastCGI Process Manager) is an alternative PHP FastCGI implementation with some additional features (mostly) useful for heavy-loaded sites.These features include:
advanced process management with graceful stop/start;
ability to start workers with different uid/gid/chroot/environment, listening on different ports and using different php.ini (replaces safe_mode);
stdout and stderr logging;
emergency restart in case of accidental opcode cache destruction;
accelerated upload support;
“slowlog” - logging scripts (not just their names, but their PHP backtraces too, using ptrace and similar things to read remote process’ execute_data) that are executed unusually slow;
fastcgi_finish_request() - special function to finish request and flush all data while continuing to do something time-consuming (video converting, stats processing etc.);
dynamic/static child spawning;
basic SAPI status info (similar to Apache mod_status);
php.ini-based config file.
用apache不用php-fpm,之所要用php-fpm就是用nginx服务器,nginx把请求用php-fpm转给php.
配置
用`./configure –prefix=/usr/local/php –enable-php-fpm
(这里只用–enable-php-fpm来编译进去就行)`指定安装目录
引用块内容
不指定prefix,则可执行文件默认放在/usr /local/bin,库文件默认放在/usr/local/lib,配置文件默认放在/usr/local/etc。其它的资源文件放在/usr /local/share。
你要卸载这个程序,要么在原来的make目录下用一次make uninstall(前提是make文件指定过uninstall),要么去上述目录里面把相关的文件一个个手工删掉。
指定prefix,直接删掉一个文件夹就够了。
编译
make
安装
make install