Actualizar el sistema
apt update
apt -y upgrade
Instalar paquetes necesarios
apt install -y lsb-release ca-certificates apt-transport-https software-properties-common
Importar la llave
wget -qO – https://nexus.uclv.edu.cu/repository/packages.sury.org/php/apt.gpg | apt-key add –
Adicionar los repos de SURY
echo "deb https://nexus.uclv.edu.cu/repository/packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/sury-php.list
Actualizas
apt update
Instalar el paquete php 8.0
apt install php8.0
Comprobar
php -v
Para instalar las extensiones necesarias:
apt install php8.0-{mysql,cli,common,imap,ldap,xml,fpm,curl,mbstring,zip}