Ôõô¹Ø±ÕnginxЧÀÍ
¿ÉÒÔͨ¹ýÒÔÏ°취¹Ø±Õ nginx ЧÀÍ£ºÊ¹Óà systemctl ÏÂÁ systemctl stop nginxʹÓà service ÏÂÁ service nginx stopʹÓà pkill ÏÂÁ pkill -f nginxÊÖ¶¯×èÖ¹ nginx£ºÕÒµ½ nginx.conf ÖÐµÄ pid Ðв¢Ê¹Óà kill -int ÏÂÁî
ÔõÑù¹Ø±Õ Nginx ЧÀÍ
Nginx ÊÇÒ»¸öÇáÁ¿¼¶ÇÒ¸ßЧµÄ Web ЧÀÍÆ÷£¬ÓÃÓÚÌṩ¾²Ì¬ºÍ¶¯Ì¬ÄÚÈÝ¡£ÔÚijЩÇéÐÎÏ£¬Äú¿ÉÄÜÐèÒª¹Ø±Õ Nginx ЧÀ;ÙÐÐά»¤¡¢¸üлò¹ÊÕÏɨ³ý¡£ÒÔÏÂÊÇÔõÑù¹Ø±Õ Nginx ЧÀÍ£º
1. ʹÓà systemctl ÏÂÁî
systemctl stop nginx
µÇ¼ºó¸´ÖÆ
´ËÏÂÁÔÚ Linux ¿¯ÐаæÖÐ×èÖ¹ Nginx ЧÀÍ¡£
2. ʹÓà service ÏÂÁî
service nginx stop
µÇ¼ºó¸´ÖÆ
´ËÏÂÁîÔÚijЩ½Ï¾ÉµÄ Linux ¿¯ÐаæÖпÉÓá£
3. ʹÓà pkill ÏÂÁî
pkill -f nginx
µÇ¼ºó¸´ÖÆ
´ËÏÂÁîʹÓÃÀú³Ì±êʶ·û (PID)ÕÒµ½²¢ÖÕÖ¹ Nginx ЧÀ͵ÄÀú³Ì¡£
4. ÊÖ¶¯×èÖ¹ Nginx
ͨ¹ýÖ±½Ó»á¼û Nginx ÉèÖÃÎļþÖеÄÏÂÁÄú¿ÉÒÔÊÖ¶¯×èÖ¹ Nginx ЧÀÍ£º
¹ØÓÚ Debian/Ubuntu£º/etc/nginx/nginx.conf
¹ØÓÚ CentOS/RHEL£º/etc/nginx/conf.d/nginx.conf
ÕÒµ½ÒÔpid¿ªÍ·µÄÒ»ÐУ¬Ëü½«°üÀ¨ Nginx Ö÷Àú³ÌµÄ PID¡£Ê¹ÓÃ´Ë PID£¬ÔËÐÐÒÔÏÂÏÂÁîÀ´ÊÖ¶¯¹Ø±Õ Nginx£º
kill -INT <pid></pid>
µÇ¼ºó¸´ÖÆ
Ñé֤ЧÀÍÊÇ·ñÒѹرÕ
Äú¿ÉÒÔͨ¹ýÒÔÏÂÏÂÁîÑéÖ¤ Nginx ЧÀÍÊÇ·ñÒÑ×èÖ¹£º
systemctl status nginx
µÇ¼ºó¸´ÖÆ
»ò
service nginx status
µÇ¼ºó¸´ÖÆ
ÄúÓ¦¸Ã¿´µ½ÀàËÆinactive (dead)»òstoppedµÄÐÂÎÅ£¬ÌåÏÖЧÀÍÒѹرա£
ÒÔÉϾÍÊÇÔõô¹Ø±ÕnginxЧÀ͵ÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡