How do I install PHP 7.2 FPM and CLI for Magento 2 to Debian 9 (Stretch)?

php7
debian
php72
(Dmitry Fedyuk) #1

Step 1

aptitude install apt-transport-https lsb-release ca-certificates &&
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg &&
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" >> /etc/apt/sources.list &&
aptitude update

Step 2

aptitude install php7.2-cli 
aptitude install php7.2-fpm
aptitude install php7.2-bcmath
aptitude install php7.2-mysql 
aptitude install php7.2-curl 
aptitude install php7.2-gd
aptitude install php7.2-imagick 
aptitude install php7.2-intl 
aptitude install php7.2-mbstring 
aptitude install php7.2-xmlrpc 
aptitude install php7.2-xsl 
aptitude install php7.2-dev 
aptitude install zip php7.2-zip 
aptitude install php-pear 
aptitude install php7.2-soap
pecl install timezonedb
pecl install mcrypt-snapshot

How to fix «mcrypt.h not found. Please reinstall libmcrypt» in Debian 9?

Step 3

rm -rf /etc/php/7.2/cli &&
ln -s /etc/php/7.2/fpm /etc/php/7.2/cli &&
/etc/init.d/php7.2-fpm restart

Step 4

apt-get purge php7.1-common php7.1-cli php7.1-fpm
0 Likes

How to adapt Magento 2 to PHP 7.2?
How do I install PHP 7.1 FPM and CLI for Magento 2 to Debian 8 (Jessie)?
How do I install PHP 7.0 FPM and CLI for Magento 2 to Debian 8 (Jessie)?
How do I install PHP 7.1 FPM and CLI for Magento 2 to Ubuntu 18?
(Dmitry Fedyuk) #2

See also:

0 Likes