常用命令手册
Nginx
安装nginx
安装前建议关闭防火墙与SELinux,参考 阿里云文档-手动部署LNMP环境
sudo yum -y install nginx
查看nginx版本
nginx -v
查看nginx状态
sudo systemctl status nginx
#或
sudo service nginx status
启动nginx
sudo systemctl start nginx
#或
sudo service nginx start
停止nginx
sudo systemctl stop nginx
#或
sudo service nginx stop
重启nginx
sudo systemctl restart nginx
#或
sudo service nginx reload
重新加载nginx配置
sudo systemctl reload nginx
#或
sudo service nginx reload
开机时启动nginx
sudo systemctl enable nginx
开机时禁止启动nginx
sudo systemctl disable nginx