Home  >  Article  >  Operation and Maintenance  >  How to install php-fpm under centos

How to install php-fpm under centos

王林
王林Original
2020-11-05 09:40:552418browse

How to install php-fpm under centos: 1. Install epel-release; 2. Install php7; 3. Install the yum source of php7; 4. Execute the [systemctl start php-fpm] command to start the service.

How to install php-fpm under centos

Environment:

##centos7.4

The installation steps are as follows:

(related Learning video recommendation:

java video tutorial)

1. Install epel-release


yum -y install epel-release

2. Install PHP7


rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

3. Check yum


yum search php70w-fpm      #PHP7.0
yum search php71w-fpm      #PHP7.1
yum search php72w-fpm      #PHP7.2

4. Install the yum source of PHP 7.0 and 7.1, and then execute:


Install php 7.0 and extensions:


yum install php70w php70w-fpm php70w-cli php70w-common php70w-devel php70w-gd php70w-pdo php70w-mysql php70w-mbstring php70w-bcmath php70w-xml php70w-pecl-redis php70w-process php70w-intl php70w-xmlrpc php70w-soap php70w-ldap php70w-opcache

Install php 7.1 and extensions:


yum install php71w php71w-fpm php71w-cli php71w-common php71w-devel php71w-gd php71w-pdo php71w-mysql php71w-mbstring php71w-bcmath php71w-xml php71w-pecl-redis php71w-process php71w-intl php71w-xmlrpc php71w-soap php71w-ldap php71w-opcache

Install php 7.2 and extensions:

yum install -y php72w php72w-fpm php72w-cli php72w-common php72w-devel php72w-gd php72w-pdo php72w-mysql php72w-mbstring php72w-bcmath php72w-xml php72w-pecl-redis php72w-process php72w-intl php72w-xmlrpc php72w-soap php72w-ldap php72w-opcache

5. Start the service


systemctl start php-fpm

6. Turn on the computer Start service

systemctl enable php-fpm

Related recommendations:

php training

The above is the detailed content of How to install php-fpm under centos. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn