centos7 --ngnix 常用命令:
配置命令
随服务器启动
# systemctl enable nginx.service
重启 nginx 服务
# systemctl restart nginx.service
停止 nginx 服务
# systemctl stop nginx.service
查看 nginx 运行状态
# systemctl status nginx.service
测试配置文件是否正常: # /usr/sbin/nginx –t
测试是否启动成功:
#curl -i localhost
- 上一篇 »CentOS7开放和关闭端口命令
- 下一篇 »CentOS7的systemctl使用