Nginx启动与停止
参考:https://www.phusionpassenger.com/library/install/nginx/install/oss/rubygems_rvm/ Starting Nginx You can start Nginx by running: Copy$ sudo /opt/nginx/sbin/nginx Shutting down Nginx You can shut down Nginx by killing its PID with the kill command. To find out what Nginx's PID is, use the ps command. For example: Copy$ ps auxw | grep nginx root ? S Jan01 : nginx: master process /opt/nginx/sbin/nginx www-data ? S Jan01 : nginx: worker process Here we see that the Nginx master process has PID (you can ignore the worker process), so we run: Copy$ sudo kill 25817 Having to perform two steps is a bit cumbersome. Luckily, there is an easier way to do this. By default, Nginx creates a PID file in /opt/nginx/logs/nginx.pid. This PID file contains Nginx's current PID. So we can use a single command to shutdown Nginx: Copy$ sudo kill $(cat /opt/nginx/logs/nginx.pid) Restarting Nginx Restarting Nginx is the same as shutting down Nginx, and starting it again. For example: Copy$ sudo kill $(cat /opt/nginx/logs/nginx.pid) $ sudo /opt/nginx/sbin/nginx
Nginx启动与停止的更多相关文章
- Nginx学习——Nginx启动、停止、重启和信号控制以及平滑升级
1.Nginx 启动与停止 (1)启动方式 启动格式:Nginx可执行文件地址 -c Nginx配置文件地址 /etc/local/nginx/sbin/nginx -c /root/dufy/ngi ...
- Ubuntu下Nginx启动、停止等常用命令
本文详细介绍Ubuntu下Nginx启动.停止等常用命令.在开发过程中,我们会经常的修改Nginx的配置文件,每次修改配置文件都可以先测试下本次修改的配置文件是否正确,可以利用以下命令: servic ...
- Nginx 启动、停止、平滑重启和平滑升级 graceful shutdown of worker processes
Controlling nginx http://nginx.org/en/docs/control.html nginx can be controlled with signals. The pr ...
- nginx启动、停止重启
启动 启动代码格式:nginx安装目录地址 -c nginx配置文件地址 例如: [root@LinuxServer sbin]# /usr/local/nginx/sbin/nginx -c /us ...
- linux配置Nginx启动,停止
Nginx 启动.重启.停止脚本 第一步 先运行命令关闭nginx sudo kill `cat /usr/local/nginx/logs/nginx.pid` 第二步 vi /etc/in ...
- nginx启动,停止,重启
Nginx的启动.停止与重启 启动 启动代码格式:nginx安装目录地址 -c nginx配置文件地址 例如: [root@LinuxServer sbin]# /usr/local/nginx/ ...
- nginx 启动,停止和重新加载配置
要启动nginx的,运行可执行文件.一旦nginx的启动时,它可以通过与-s参数调用可执行来控制.使用以下语法 nginx -s signal 其中,信号可以是下列之一: stop - fast sh ...
- Nginx启动、停止与平滑重启
如何启动Nginx:/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf 停止Nginx:可以发送向通信号给Nginx主进程的 ...
- Nginx启动和停止
启动nginx [root@LinuxServer sbin]# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx ...
- nginx启动、停止、重启
转自https://www.cnblogs.com/wangcp-2014/p/9922845.html 启动 启动代码格式:nginx安装目录地址 -c nginx配置文件地址 例如: [root@ ...
随机推荐
- 【C/C++学院】0828-数组与指针/内存分配/数据结构数组接口与封装
[送给在路上的程序猿] 对于一个开发人员而言,可以胜任系统中随意一个模块的开发是其核心价值的体现. 对于一个架构师而言,掌握各种语言的优势并能够运用到系统中.由此简化系统的开发,是其架构生涯的第一步. ...
- 编辑mac系统环境变量后保存,提示没有权限用到下面这个命令
编辑的文件是vim /etc/paths :w !sudo tee % %代表当前编辑文件名 MAC:查看端口占用情况: lsof -i tcp: list open files lsof -i 用以 ...
- .net 定时服务
namespace MvcApplication1 { public class MvcApplication : System.Web.HttpApplication { protected voi ...
- android 多应用程序数据共享 ContentProvider和ContentResolver
android 没有一个可以将所有应用程序数据统一放置的地方,即两个应用程序间的数据不能共享.但ContentProvider与ContentResolver可以解决多应用程序数据共享. 我们都知 ...
- Windows 清除系统垃圾文件
@echo off echo 正在清除系统垃圾文件,请稍等...... del /f /s /q %systemdrive%\*.tmp del /f /s /q %systemdrive%\*._m ...
- Dictionary及KeyValuePair使用
/// <summary> /// 除去数组中的空值和签名参数并以字母a到z的顺序排序 /// </summary> /// <param name="dicA ...
- iOS SDWebImage加载大图导致内存崩溃解决方案
static BOOL SDImageCacheOldShouldDecompressImages = YES; static BOOL SDImagedownloderOldShouldDecomp ...
- Jenkins入门(一)
Jenkins就是一个Java Web应用,它主要是干什么呢? 其实很简单: 下载一个jenkins的war包,然后扔到tomcat 的webapps中,启动这个tomcat,访问jenkins应用即 ...
- C语言中的main函数以及main函数是如何被调用的
main函数是C语言中比较特殊的函数,C程序总是从main函数开始执行,main函数的原型是: int main(int argc, char *argv[]); 其中argc是命令行参数的个数,ar ...
- java心跳发送
java心跳发送: 大家都知道.如果你在互联网公司,并且开发的是产品那你一定接触不到.心跳机制.心跳包 那什么是心跳机制呢? 心跳机制就是定时发送一个自定义的结构体(心跳包).确保连接的有效的机制. ...