Installing NGINX via package managers
The quickest, and easiest, way to install NGINX is to simply use your OS-provided version. Most of the time, these are kept fairly updated; however, for some Linux distributions focusing on stability, you may only have older versions of NGINX available. Sometimes, your Linux distribution may provide multiple versions of NGINX with different compile flags.
In general, before embarking on a more complex journey, we should check whether we can use the easy solution. For Red Hat Linux-based operating systems, we need to enable the EPEL repo first and then do the same:
yum install epel-release yum search nginx yum info PACKAGE_NAME yum install PACKAGE_NAME
For a Debian-based operating system, we first find the NGINX compiles available and then get the information for the one we want:
apt-cache search nginx apt-cache show PACKAGE_NAME apt install PACKAGE_NAME
If the version provided is current enough, then you’re ready to configure...