Instalar PHP 8.2

Cómo instalar la versión 8.1 de PHP

Install PHP 8.2 with Nginx Option

 

Sistema operativo en el servidor VPS: Ubuntu 20.04 LTS

Conectarse por ssh al servidor vps:

ssh usuario@alumno.me

Añadir el repositorio PPA de Ondřej Surý

# Add repository
sudo apt install php8.2 php8.2-fpm php8.2-cli -y

# Once installed, the PHP-FPM service is automatically started, and you can check the status to make sure it’s running ok.
sudo systemctl status php8.2-fpm

# Check the PHP Version
php -v

 

Modificar la configuración del servidor virtual y poner php8.1-fpm.sock (en lugar de php8.0-fpm.sock)

nano /etc/nginx/sites-available/todo

server {

 # … some other code


 location ~ .php$ {
   include snippets/fastcgi-php.conf;
   fastcgi_pass unix:/run/php/php8.2-fpm.sock;
 }

 

Comprobar la configuración de nginx y reiniciarlo

sudo nginx -t

sudo systemctl restart nginx

 

 

Deja una respuesta