更新系统
yum update -y
更新软件包
yum upgrade -y
安装nginx源
rpm -ivh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
安装nginx
yum install nginx -y
查看nginx版本
nginx -v
启动nginx服务
systemctl start nginx
nginx服务自启
systemctl enable nginx
禁止nginx服务自启
systemctl disable nginx
查看nginx状态
systemctl status nginx
重新加载nginx
systemctl reload nginx
暂停nginx
systemctl stop nginx
重启nginx
systemctl restart nginx
语法检查nginx
nginx -t