LEMP-logo-smallLEMP (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 23/22/21, CentOS 7.2/6.7/5.11, Red Hat 7.2/6.7/5.11)

Currently there are four different instructions for installing Linux (Fedora 23/22/21, CentOS 7.2/6.7/5.11 and Red Hat 6.7).

Install Fedora 23 Linux >>

Install Fedora 22 Linux >>

Install Fedora 21 Linux >>

Install CentOS 7.2 Linux >>

Install CentOS 6.7 Linux >>

Install CentOS 5.11 Linux >>

Install Red Hat (RHEL) 6 Linux >>

2. Install MariaDB 5.5/10.0/10.1 or MySQL 5.7

Install MariaDB 5.5/10.0/10.1 database server >>

— OR —

Install MySQL 5.7 database server >>

Note: Open MySQL port only when it’s really needed and otherwise use it only locally (localhost)

3. Install Nginx with PHP (PHP-FPM) 5.6

This Nginx and PHP (PHP-FPM) part use Remi Repository and install latest PHP (PHP-FPM) 5.6 (currently 5.6.15) version.

Install Nginx web server with PHP (PHP-FPM) support >>

Nginx and PHP-FPM Configuration and Optimizing Tips and Tricks >>

PHP: APC Configuration and Usage Tips and Tricks >>

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.