Come installare php7.4 e php7.4-fpm in Debian, Deepin, Ubuntu, Mint, ecc.
Installa il repository:
~$ apt install gnupg2 -y
~$ wget -qO – https://packages.sury.org/php/apt.gpg | sudo apt-key add – ~$
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php7.x.list Aggi
ornamento:
~$ apt update
~$ apt upgrade
Installa:
~$ apt install php7.4
Installa con le estensioni più comunemente uti
lizzate: ~$ sudo apt installa php libapache2-mod-php7.4 php7.4-cli php7.4-common php7.4-json php7.4-opcache php7.4-readline libphp7.4-embed php7.4-bz2 php7.4-php7.4-curl comune php7.4-dba php7.4-fpm php7.4-gd php7.4-interbase php7.4-intl php7.4-ldap php7.4-mbstring php 7.4 4-mysql php7.4-pgsql php7.4-phpdbg php7.4-soap php7.4-sqlite3 php7.4-tidy php7.4-xml php7.4-xsl php7.4-zip
Scambio di versioni php
:~$ update-alternatives –set php /usr/bin/php7.
4~$ update-alternatives –set phar /usr/bin/phar7.
4~$ update-alternatives –set phar.phar /usr/bin/phar.phar7.4
Attivazione di php7.4-f
pm:~$ systemctl disable php*-fpm (swap * per la versione dell'attualmente a
ttivo)~$ systemctl stop php
*-fpm~$ systemctl enable php7.4-
fpm~$ systemctl start php7.4-f
pm~$ systemctl restart apache2