安装NGINX
yum install nginx -y
- 启动NGINX服务
systemctl start nginx.service
- 设置开机自启动
systemctl enable nginx.service
- 重启NGINX服务
systemctl restart nginx.service
- 关闭NGINX服务
systemctl stop nginx.service
- 重载NGINX配置(无需停止服务即可生效)
systemctl reload nginx.service
- 本地测试是否启动成功
curl -I localhost