Ravindra BagaleCourses & study guides मराठी Track your progress

Ravi Sir's Cyber Security Cards › Revision Cards

Installing PHP on Amazon Linux 2023 and Ubuntu

Installing PHP on Amazon Linux 2023 and Ubuntu PHP runs code on the server to build pages. PHP-FPM is the PHP service that the web server hands work to. Amazon Linux: sudo yum install -y php php-fpm . Ubuntu: sudo apt install -y php-fpm . Installing PHP but not starting php-fpm. Nginx shows 502 Bad

Installing PHP on Amazon Linux 2023 and Ubuntu PHP runs code on the server to build pages. PHP-FPM is the PHP service that the web server hands work to. Amazon Linux: sudo yum install -y php php-fpm . Ubuntu: sudo apt install -y php-fpm . Installing PHP but not starting php-fpm. Nginx shows 502 Bad
Installing PHP on Amazon Linux 2023 and Ubuntu · Download PNG
Read card text

What this card says

What it is

PHP runs code on the server to build pages.

PHP-FPM is the PHP service that the web server hands work to.

How

Amazon Linux: sudo yum install -y php php-fpm. Ubuntu: sudo apt install -y php-fpm.

Common mistake

Installing PHP but not starting php-fpm. Nginx shows 502 Bad Gateway.

Start it: sudo systemctl enable --now php-fpm.

OS + web serverInstall commandPHP handler
AL2023 + Nginx or Apachesudo yum install -y php php-fpm php-mysqlnd php-cliPHP-FPM socket /run/php-fpm/www.sock
CentOS Stream 9 + Nginx or Apachesudo yum install -y php php-fpm php-mysqlnd php-cliPHP-FPM socket /run/php-fpm/www.sock
Ubuntu + Nginxsudo apt install -y php-fpm php-mysqlPHP-FPM socket /run/php/php8.x-fpm.sock
Ubuntu + Apachesudo apt install -y php libapache2-mod-php php-mysqlApache mod_php (no FPM needed)

Learn more in the lesson: 9.2 Installing PHP on Amazon Linux 2023 and Ubuntu

See all Ravi Sir's Cyber Security Cards