Centos yum安装php-fpm,不用编译安装

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/eddy23513/article/details/82945544

1、删除
1.1、如果之前编译安装了php,则进入安装位置直接删除

一般安装位置为/usr/local/php

1.2、如果之前使用yum安装的,则运行

yum remove php php-common  

2、安装
参考:https://webtatic.com/packages/php56/

以下以安装5.6x版本为例:
CentOS/RHEL 6.x:

yum install epel-release
rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm

Now you can install PHP 5.6’s mod_php SAPI (along with an opcode cache) by doing:

yum install php56w php56w-opcache

You can alternatively install PHP 5.6’s php-fpm SAPI (along with an opcode cache by doing:

yum install php56w-fpm php56w-opcache

备注说明:
yum install php56w php56w-opcache:安装opcache扩展,安装其他扩展同理

php -m:查看已经安装的扩展;
whereis php :查看php-fpm的安装位置;
service php-pfm start:开启php-pfm服务;
pkill php-fpm:关闭服务;

猜你喜欢

转载自blog.csdn.net/eddy23513/article/details/82945544