1. 环境变量配置
# 根据自身服务环境,进行配置 export NGINX_HOME=/usr/local/nginx export path=${NGINX_HOME}/sbin
2.source ~/.bashrc使文件生效
# nginx启动 root@:~# nginx # 查询nginx版本 root@:~# nginx -v nginx version: nginx/1.13.7 # 查看配置是否符合语法 root@:~# nginx -t nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful # nginx配置重新加载(nginx的热部署) root@:~# nginx -s reload # nginx停止 root@:~# nginx -s stop
本文链接:https://blog.runxinyun.com/post/302.html 转载需授权!
留言0