yum安装php-fpm的方法:首先配置好yum源;然后安装php;最后执行命令“yum install --enablerepo=remi --enablerepo=remi-php56 php-fpm”安装“php-fpm”即可。
推荐:《php教程》
centos yum安装php5.6以及php-fpm
简单介绍一下,如何在centos上安装升级php5.6。
配置yum源
追加centos 6.5的epel及remi源。
以下是centos 7.0的源。
yum install epel-release rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
yum install epel-releaserpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
安装php5.6
yum源配置好了,下一步就安装php5.6。
yum install -y --enablerepo=remi --enablerepo=remi-php56 php php-opcache php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-phpunit php-pecl-xdebug php-pecl-xhprof php-fpm
注意:bcmath 不安装mcrypt有时候用不了 ,,
用php命令查看版本。
php --versionphp 5.6.0 (cli) (built: sep 3 2014 19:51:31) copyright (c) 1997-2014 the php group zend engine v2.6.0, copyright (c) 1998-2014 zend technologies with zend opcache v7.0.4-dev, copyright (c) 1999-2014, by zend technologies with xdebug v2.2.5, copyright (c) 2002-2014, by derick rethans
在这里安装的版本是php5.6.0,细心的用户可能已经发现zendguardloader变成zend opcahe了。
对从php5.5开始php代码缓存从apc变成了zend opcache了。
如果配置nginx的话,还需要安装php-fpm
yum install --enablerepo=remi --enablerepo=remi-php56 php-fpm
启动php-fpm服务:
systemctl start php-fpm.service
以上就是yum如何安装php-fpm的详细内容。