Install Nginx on CentOS 8

To install Nginx web server on CentOS 8, create repo

vi /etc/yum.repos.d/nginx.repo

Add

[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=0
enabled=1

Install nginx with dnf or yum

dnf install nginx

Open HTTP and HTTPS ports on firewall

firewall-cmd --zone=public --permanent --add-service=http
firewall-cmd --zone=public --permanent --add-service=https
firewall-cmd --zone=public --permanent --add-service=ssh
firewall-cmd --reload
Need help with Linux Server or WordPress? We can help!

Leave a Reply

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