安装nginx yum安装nginx yum install nginx -y 启动关闭重启服务 systemctl enable nginx #开机自动启动 systemctl start nginx systemctl stop nginx systemctl restart nginx nginx配置检测 在修改配置了配置之后,需要重新启动服务的时候,先用nginx -t检测一下配置有没有错误。 nginx -t