Centos 安装php php-fpm

首先来到 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

安装完成

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值