PHP 8 introduce numerose novità e miglioramenti. Questa guida mostra l'installazione su Debian 10 tramite repository SURY.
Prerequisiti
- Debian 10
- Utente con sudo
- Connessione Internet
Repository SURY
sudo apt update sudo apt upgrade -y sudo apt install -y lsb-release apt-transport-https ca-certificates wget sudo 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" | sudo tee /etc/apt/sources.list.d/php.list sudo apt update
Installazione PHP 8
sudo apt install php8.0 -y
sudo apt install php8.0-fpm -y
sudo apt install -y php8.0-{mysql,cli,common,snmp,ldap,curl,mbstring,zip}
php -vConfigurare /etc/php/8.0/apache2/php.ini o /etc/php/8.0/fpm/pool.d/www.conf in base al server web. Creare un file info.php che richiami phpinfo() per verificare l'installazione.