Note: Install nginx from official repositories with dnf on CentOS 8


Add to repository


name=nginx repo

Exclude AppStream and refer to from the above repository

$ dnf --disablerepo=AppStream info nginx
nginx repo                                                                               22 kB/s |  47 kB     00:02
Available Packages
Name         : nginx
Epoch        : 1
Version      : 1.19.3
Release      : 1.el8.ngx
Architecture : x86_64
Size         : 814 k
Source       : nginx-1.19.3-1.el8.ngx.src.rpm
Repository   : nginx
Summary      : High performance web server
URL          :
License      : 2-clause BSD-like license
Description  : nginx [engine x] is an HTTP and reverse proxy server, as well as
             : a mail proxy server.


$ sudo dnf --disablerepo=AppStream install nginx
nginx repo                                                                               27 kB/s |  47 kB     00:01
Last metadata expiration check: 0:00:01 ago on Tue 06 Oct 2020 01:45:05 AM UTC.
Dependencies resolved.
 Package                 Architecture             Version                                 Repository               Size
 nginx                   x86_64                   1:1.19.3-1.el8.ngx                      nginx                   814 k

Transaction Summary
Install  1 Package

Total download size: 814 k
Installed size: 2.8 M
Is this ok [y/N]:y ← y response
Downloading Packages:
nginx-1.19.3-1.el8.ngx.x86_64.rpm                                                       302 kB/s | 814 kB     00:02
------------------------------------------------------------------------------------------------------------------------Total                                                                                   302 kB/s | 814 kB     00:02
warning: /var/cache/dnf/nginx-f354473966140c6b/packages/nginx-1.19.3-1.el8.ngx.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID 7bd9bf62: NOKEY
nginx repo                                                                              1.4 kB/s | 1.5 kB     00:01
Importing GPG key 0x7BD9BF62:
 Userid     : "nginx signing key <[email protected]>"
 Fingerprint: 573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62
 From       :
Is this ok [y/N]:y ← y response
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                1/1
  Running scriptlet: nginx-1:1.19.3-1.el8.ngx.x86_64                                                                1/1
  Installing       : nginx-1:1.19.3-1.el8.ngx.x86_64                                                                1/1
  Running scriptlet: nginx-1:1.19.3-1.el8.ngx.x86_64                                                                1/1

Thanks for using nginx!

Please find the official documentation for nginx here:

Please subscribe to nginx-announce mailing list to get
the most important news about nginx:

Commercial subscriptions for nginx are available on:


  Verifying        : nginx-1:1.19.3-1.el8.ngx.x86_64                                                                1/1




$ sudo systemctl start nginx

Autostart settings

$ sudo systemctl enable nginx


$ sudo systemctl stop nginx

Recommended Posts

Note: Install nginx from official repositories with dnf on CentOS 8
Install nginx on centOS7
Install apache 2.4.46 from source on CentOS7
Install samba4 from source code on CentOS8
Install NextCloud on CentOS 7 with Alibaba Cloud ECS
Command to install nginx / PHP7 / php-fpm on CentOS7
Note Book: OpenCV with CUDA Install On Windows10
Install GitLab on CentOS 8 with no internet connection
Install Neo4j 4.1.3 on centOS
Install Vertica 10.0 on CentOS 6.10
Install PostgreSQL 12 on Centos8
Install Python 3 on CentOS 7
Install kuromoji on CentOS7
Install Mattermost on CentOS 7
Install PostGIS 2.5.5 on CentOS7
Install jpndistrict on CentOS 7
Install Redmine 4.1.1 on CentOS 7
Smokeping Install on CentOS7
Install PostgreSQL 13 on CentOS 7.5
Install the latest hardware drivers from ELRepo on CentOS
Network install CentOS 8 with Kickstart.
Install OpenFOAM v2006 on CentOS
Install Jenkins on Docker's CentOS
Install Apache on CentOS on VirtualBox
Install Ruby 2.7 on CentOS 7 (SCL)
Note: Install PostgreSQL 9.5 on Ubuntu 18.04
Install Ruby on MSYS2 with pacman
Try DPDK20 SDK on CentOS7 ①Install
Install Java with zip on Windows
Install Ruby 2.5 on CentOS 7 using SCL
Install Java Open JDK 8 on CentOS 7
Note Book: OpenBLAS Install On Windows10
WordPress with Docker Compose on CentOS 8
Upgrade from MYSQL5.7 to 8.0 on CentOS 6.7
How to install MariaDB 10.4 on CentOS 8
Steps to install MySQL 8 on CentOS 8
Note Book: LAPACK Install On Windows 10
Steps to install devtoolset-6 on CentOS 7
Note Book: VTK Install On Windows10
Install ruby on Ubuntu 20.04 with rbenv
Use Docker CE (official) on CentOS 8
Install Java 9 on windows 10 and CentOS 7
Build a development environment on AWS EC2 with CentOS7 + Nginx + pm2 + Nuxt.js
Install imagick on macOS Catalina + php 7.4 Note
Install the webmail client Rainloop on CentOS 8
How to install beta php8.0 on CentOS8
Install Realtek network driver on Ubuntu Note
Install Java8 with Yum on Amazon Linux
Personal tips on working with CentOS servers
Install CentOS 7 on Raspberry pi 4 Model B
Installing and configuring ClipBucket and Nginx on CentOS 7
Note Book: OpenCV v4.5.0 with Alphamat Install On Windows10 But it need Eigen
A quick note on using jshell with the official Docker image of the JDK