LEMP (Linux, Nginx, MySQL, PHP) server is extremely powerful setup behind any website or web based service. This guide is collection of Fedora/CentOS/Red Hat (RHEL), Nginx, MariaDB/MySQL and PHP (PHP-FPM) install guides.
This guide (more specifically this guide parts) try to explain in more detail LEMP (Linux, Nginx, MariaDB/MySQL, PHP (PHP-FPM)) server environment installation. This howto can be used to pre-installed Linux, and instructions can be used for various Fedora and Red Hat based Linux distros with YUM. This guide is also usable with setup where MariaDB/MySQL databases, Nginx servers and even PHP-FPM are on different server machines. So you could have different servers to process MariaDB/MySQL queries, Web Server requests and PHP requests.
This guide includes three separated steps/guides
Note: Any step can be omitted if something does not want to install.
1. Install Linux (Fedora 28/27/26, CentOS 7.5/6.9, Red Hat 7.5/6.9)
Currently there are four different instructions for installing Linux (Fedora 28/27/26, CentOS 7.5/6.9 and Red Hat 6.9).
2. Install MariaDB 10.2/10.1/10.3 or MySQL 8.0/5.7
— OR —
Note: Open MySQL port only when it’s really needed and otherwise use it only locally (localhost)
3. Install Nginx with PHP (PHP-FPM) 7.2
This Nginx and PHP (PHP-FPM) part use Remi Repository and install latest PHP (PHP-FPM) 7.2 (currently 7.2.5) version.
Finally you are done, most important configurations and checks have been completed and you are ready to run your site(s) on LEMP (Linux, Nginx, MariaDB/MySQL, PHP) environment.