# 安装nginx

dnf install nginx

# 启用nginx

sudo systemctl enable nginx
sudo systemctl start nginx

# 如果需要配置防火墙

firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --reload