Installing LEMP stack on Ubuntu
- Installing Ubuntu
- Installing Nginx
- Installing MySQL or MariaDB
- Installing PHP
- Configuring Nginx to support PHP
In this article I will explain how to install the LEMP stack (Linux, Nginx, MySQL, PHP) on the Ubuntu operating system. I have already described in detail the installation of each part of this stack in separate articles. Therefore, I will not duplicate the content, but simply provide links to these articles in the correct order.
You must have the Ubuntu operating system installed. If the operating system is not already installed, then you can install the Ubuntu 20.04 Focal Fossa.
First of all, you need to install the Nginx server. Make sure that the Nginx server is running and is also enabled to start automatically when the system boots.
Now install PHP. It is advisable to install the latest stable version. Also install the most commonly used extensions.
Finally, configure the Nginx server to support PHP (nginx + php-fpm). You need to specify the path to the PHP handler.