How to Install Nginx with PHP and MariaDB (LEMP Stack) with Opcache, Redis and Let’s Encrypt on Ubuntu
A LEMP software stack is a group of open-source software that is installed together to enable a server to host websites and apps. It is an acronym for Linux, ENginx server, MySQL (using MariaDB), and PHP.
In this guide, you will install a LEMP stack on a Fedora 32 based server. We will also install phpMyAdmin, Redis, Opcache, and Let’s Encrypt SSL.
Prerequisites
A server running Fedora 32.
A non-root sudo user.
Make sure everything is updated.
$ sudo dnf upgrade
Few packages that your system needs.
$ sudo dnf install wget curl nano -y
Some of these packages may already be installed on your system.
Disable SELinux.
$ sudo setenforce 0
Configure Firewall
The first step is to configure the firewall. Fedora server comes with Firewalld firewall preinstalled.
Check if the firewall is running.
$ sudo firewall-cmd --state
You should get the following output.
running
Set the default zone of the firewall to public.
$ sudo firewall-cmd --set-default-zone=public