Nginx Start, restart, shutdown
First, start
CD Usr/local/nginx/sbin./nginx
Second, restart
Change Configuration Restart Nginx
Kill-hup The main process number or process number file path or use cd/usr/local/nginx/sbin./nginx-s reload
Determine if the configuration file is correct
Nginx-t-c/usr/local/nginx/conf/nginx.conf or Cd/usr/local/nginx/sbin./nginx-t
Third, close
Query Nginx main process number
Ps-ef | grep nginx
Calmly stop Kill-quit master process number
Fast Stop Kill-term main process number
Force Stop kill-9 Nginx
If the PID file path is configured nginx.conf, if not, in the logs directory
Kill-Signal type '/usr/local/nginx/logs/nginx.pid '
Four, upgrade
1. Replace the old program file with the new program first
2, KILL-USR2 the old version of the program's main process number or process file name
At this point the old Nginx master process will rename its process file to. oldbin, then execute the new version of Nginx, at which time the old and the newer versions run simultaneously
3, Kill-winch old version main process number
4. Start new/old worker process without overloading configuration
Kill-hup old/New version main process number
Calmly close the old/new process
Kill-quit old/New process number
Close old/new processes quickly
Kill-term old/New process number
Nginx Start, restart, shutdown