Home >Backend Development >PHP Problem >How to install php fpm with yum
How to install php fpm with yum: first run the command "yum remove php php-common" to delete the installed php; then execute the command "yum install php56w-fpm php56w-opcache" to install php fpm.
Centos yum installs php-fpm, no need to compile and install
1, delete
1.1 . If php has been compiled and installed before, go to the installation location and delete it directly
The general installation location is /usr/local/php
1.2. If it was installed using yum before, run
yum remove php php-common
2. Installation
Reference: https://webtatic.com/packages/php56/
The following takes the installation of version 5.6x as an example:
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
Remarks Description:
yum install php56w php56w-opcache: Install the opcache extension, install other extensions in the same way
php -m: View the installed extensions;
whereis php: View The installation location of php-fpm;
service php-pfm start: open the php-pfm service;
pkill php-fpm: close the service;
More related knowledge, Please visit PHP Chinese website!
The above is the detailed content of How to install php fpm with yum. For more information, please follow other related articles on the PHP Chinese website!