NGINX在centos上操作有关命令,以前的启动方法无法实现(services nginx start or systemctl start nginx)
1.查找安装路径:
whereis nginx
2. 执行启动命令
./nginx --启动
./nginx -s stop --停止
./nginx -s quit
./nginx -s reload
操作图片如下图所示,如果有什么异常,请看LOG档
1.基本操作
cd C:\Program Files\nginx-1.15.2
1.1 启动nginx
start nginx
1.2.修改配置后重新加载生效
nginx -s reload
1.3 重新打开日志文件
nginx -s reopen
nginx -t -c /path/to/nginx.conf 测试nginx配置文件是否正确
关闭nginx:
nginx -s stop :快速停止nginx
nginx -s quit :完整有序的停止nginx
Windows Server 2012以上安装nginx
1.安装教程网址
1.1 https://www.jb51.net/article/120469.htm
1.2 https://www.cnblogs.com/edward2013/p/5506588.html
2.下载Windows Service Wrapper
官网地址:
https://github.com/kohsuke/winsw/
下载地址:
http://repo.jenkins-ci.org/releases/com/sun/winsw/winsw/
http://repo.jenkins-ci.org/releases/com/sun/winsw/winsw/