nginx

一、安装
链接:http://www.nginx.cn/install
sudo ./configure –sbin-path=/usr/local/nginx/nginx –conf-path=/usr/local/nginx/nginx.conf –pid-path=/usr/local/nginx/nginx.pid –with-http_ssl_module –with-pcre=/usr/local/src/pcre-8.37 –with-zlib=/usr/local/src/zlib-1.2.8 –with-openssl=/usr/local/src/openssl-1.0.2c –with-http_realip_module –add-module=/usr/local/src/echo-nginx-module-0.57 && sudo make && sudo make install

二、启动
1.nginx -t -c -v -V 2.nginx从容停止命令,等所有请求结束后关闭服务: ps -ef | grep nginx kill -QUIT nginx主进程号 nginx 快速停止命令,立刻关闭nginx进程: ps -ef | grep nginx kill -TERM nginx主进程号 kill -9 nginx主进程号 kill -信号类型(HUP|TERM|QUIT) `cat /usr/local/nginx/nginx.pid` TERM, INT:快速关闭 QUIT:从容关闭 HUP:重载配置,用新的配置开始新的工作进程,从容关闭旧的工作进程 USR1:重新打开日志文件 USR2:平滑升级可执行程序 WINCH:从容关闭工作进程

sosop hou 19 June 2015
blog comments powered by Disqus