Install PHP on Debian
This is just quick note about how to install PHP in debian using deb.sury.org repository
First, setup debian PHP repository using this command
# curl https://packages.sury.org/php/README.txt | sh
Make sure you're login as root when running this command.
Now, install PHP and web server
# apt install nginx php8.4-cli php8.4-fpm
This command install nginx (web server), php, php-fpm, and php's base
extensions. If you need additionnal extensions you can install it with
apt install php[version]-[extension-name]
.
Please note that if you just install php8.4
, it will
automatically install apache web server.