How to install latest official Nginx on Centos 8 / RHEL 8

How to install latest official Nginx on Centos 8 / RHEL 8

How to install latest official Nginx on Centos 8 / RHEL 8, instead using Nginx from Centos 8 or RHEL 8 repository.

Currently Centos / RHEL 8 repo using too old version of Nginx 1.14.1.

If you already install Nginx 1.14.1 remove it first

First install dnf-utils

Create file in /etc/yum.repos.d/nginx.repo and paste code below

By default, the repository for stable nginx packages is used. If you would like to use mainline nginx packages, run the following command:

If you running on production server, choose Nginx stable version.

To install nginx, run the following command:

When prompted to accept the GPG key, accept it.

Enable Nginx start up and start Nginx.

Leave a Reply

Your email address will not be published. Required fields are marked *