yum安装nginx
yum install epel-release
yum install nginx
开机启动
systemctl start nginx.service # 启动nginx服务
systemctl stop nginx.service # 停止服务
systemctl restart nginx.service # 重新启动服务
systemctl list-units --type=service # 查看所有已启动的服务
systemctl status nginx.service # 查看服务当前状态
systemctl enable nginx.service # 设置开机自启动
systemctl disable nginx.service # 停止开机自启动