Install Nginx on CentOS 8
To install Nginx web server on CentOS 8, create repo
1 |
vi /etc/yum.repos.d/nginx.repo |
Add
1 2 3 4 5 |
[nginx] name=nginx repo baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ gpgcheck=0 enabled=1 |
Install nginx with dnf or yum
1 |
dnf install nginx |
Open HTTP and HTTPS ports on firewall
1 2 3 4 |
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 |