CentOS 安装nginx服务
安装nginx服务
sudo yum install nginx

启动nginx
systemctl start nginx

加入启动项
systemctl enable nginx

测试nginx服务
sudo curl http://localhost

配置防火墙
firewall-cmd --zone=public --add-port=80/tcp --permanent

重启防火墙生效
systemctl restart firewalld

使用ip外部访问


浙公网安备 33010602011771号