Skip to content

Instantly share code, notes, and snippets.

@jasonblewis
Forked from w33zy/php7.1.md
Last active May 29, 2018 01:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasonblewis/d1558111c9764a30f6a05ffe3201536d to your computer and use it in GitHub Desktop.
Save jasonblewis/d1558111c9764a30f6a05ffe3201536d to your computer and use it in GitHub Desktop.
How to install php7.1-fpm with EasyEngine

How to install php7.2-fpm with EasyEngine


you need to have the php7.0 stack installed

ee stack install --php7

install the nginx stack

ee stack install --nginx

install ee's version of nginx-common

apt install nginx-common=1.10.3-10ppa~stable

and put it on hold

apt-mark hold nginx-common

Install php7.2-fpm

apt install php7.2-common php7.2-cli php7.2-zip php7.2-opcache php7.2-mysql php7.2-mbstring php7.2-json php7.2-intl php7.2-gd php7.2-fpm php7.2-curl php7.2-bz2

Copy the php7.2-fpm pool configuration from php7.0-fpm

cp -f /etc/php/7.0/fpm/pool.d/www.conf /etc/php/7.2/fpm/pool.d/www.conf

Edit the listening port of php7.2-fpm (for example 7080 instead of 7070)

nano /etc/php/7.2/fpm/pool.d/www.conf

Replace the line listen = 127.0.0.1:9070 by listen = 127.0.0.1:9080
Restart the service

service php7.2-fpm restart

Then to use php7.2-fpm, you have the choice between


1) Replace globally php7.0-fpm with php7.2-fpm

In this case just edit the file /etc/nginx/conf.d/upstream.conf and replace the line server 127.0.0.1:9070; by server 127.0.0.1:9080;
Then reload nginx


2) Add php7.2-fpm as an additional php version

Add the following lines in /etc/nginx/conf.d/upstream.conf

upstream php72 {
server 127.0.0.1:9080;
}

then copy the files /etc/nginx/common/php7.conf into /etc/nginx/common/php72.conf
And into this copy replace the line fastcgi_pass php7; by fastcgi_pass php72;

Reload nginx and you can replace the line include common/php7.conf; by include common/php72.conf; in the vhosts of your choice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment