Nginx start-Up and shutdown

Source: Internet
Author: User

[[email protected] ~]# #默认启动方式 [[email protected] ~]# which nginx/sbin/nginx[[email protected] ~]# Nginx [[email protected] ~]# #另行指定配置文件 [[email protected] ~]# nginx-c/tmp/nginx.conf[[email protected ] ~]# #另行指定配置文件 [[email protected] ~]# nginx-c/tmp/nginx.conf[[email protected] ~]# #另行指定nginx安装目录 [[email& Nbsp;protected] ~]# nginx-p/usr/local/nginx/[[email protected] ~]# #另行指定全局项启动方式 [[email protected] ~]# Nginx-g "PID/VAR/NGINX/TEST.PID;" [[email protected] ~]# #测试配置信息是否有错误 [[email protected] ~]# nginx-t[[email protected] ~]# #测试配置阶段不输出信息 [ [email protected] ~]# nginx-t-q[[email protected] ~]# #显示版本 [[email protected] ~]# Nginx-vnginx version : nginx/1.4.7[[email protected] ~]# #显示编译阶段的参数 [[email protected] ~]# Nginx-vnginx version:nginx/1.4.7built by GCC 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) TLS SNI support enabledconfigure arguments:--prefix=/usr/local/nginx--sbin -path=/sbin/nginx--conf-path=/etc/nginx/nginx.conf--WITH-CC=/USR/BIN/GCC--error-log-path=/var/log/nginx/error.log--pid-path=/var/run/ Nginx.pid--lock-path=/var/lock/nginx--builddir=/user/local/nginx/objs--with-perl=/usr/bin/perl--http-log-path= /var/log/nginx/access.log--user=nginx--group=nginx--http-proxy-temp-path=/tmp/nginx/proxy_temp--with-pcre-- With-pcre=/usr/src/pcre--with-openssl=/usr/src/openssl--with-zlib=/usr/src/zlib--with-http_ssl_module-- With-http_stub_status_module--with-http_realip_module--with-http_mp4_module--with-http_flv_module[[email  Protected] ~]# #快速的停止服务 [[email protected] ~]# nginx-s stop[[email protected] ~]# ps-ef | grep nginxroot 20824 1597 0 06:47 pts/0 00:00:00 grep nginx[[email protected] ~]# nginx [[Email protect Ed] ~]# Ps-ef |        grep nginxroot 20826 1 0 06:47?        00:00:00 nginx:master process Nginxnginx 20827 20826 0 06:47? 00:00:00 nginx:worker processroot 20829 1597 0 06:47 pts/0 00:00:00 gRep nginx[[email protected] ~]# kkbd_mode keytool killall krb5-config kbdrate kill Killal L5 [[email protected] ~]# kill-s sigterm 20826 "=nginx-s Stop" [[email protected] ~]# Ps-ef | grep nginxroot 20831 1597 0 06:48 pts/0 00:00:00 grep nginx[[email protected] ~]# # "Graceful Way to stop service" [[Email p Rotected] ~]# nginx-s quit "=kill-s sigquit <nginx master pid>" stop worker process graceful "kill-s sigwinch <nginx worker pid > "[[email protected] ~]# #允许的nginx重读配置文件 [[email protected] ~]# nginx-s reload[[email protected] ~] # #-s reopen reopen log file [[email protected] ~]# nginx-s reopen[[email protected] ~]# nginx-h

  

Nginx start-Up and shutdown

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.