Linux ÖØÆôЧÀ͵Ä׼ȷ·½·¨ÊÇʲô£¿
Linux ÖØÆôЧÀ͵Ä׼ȷ·½·¨ÊÇʲô£¿
ÔÚʹÓà Linux ϵͳʱ£¬¾³£»áÓöµ½ÐèÒªÖØÆôij¸öЧÀ͵ÄÇéÐΣ¬¿ÉÊÇÓÐʱ¼äÎÒÃÇ¿ÉÄÜ»áÔÚÖØÆôЧÀÍʱÓöµ½Ò»Ð©ÎÊÌ⣬ºÃ±ÈЧÀÍûÓÐÕæÕý×èÖ¹»òÆô¶¯µÈÇéÐΡ£Òò´Ë£¬ÕÆÎÕ׼ȷµÄÖØÆôЧÀ͵ķ½·¨ÊǺÜÊÇÖ÷ÒªµÄ¡£
ÔÚ Linux ÖУ¬Í¨³£¿ÉÒÔʹÓà systemctl ÏÂÁîÀ´ÖÎÀíϵͳЧÀÍ¡£systemctl ÏÂÁîÊÇ systemd ϵͳÖÎÀíÆ÷µÄÒ»²¿·Ö£¬Ëü¿ÉÒÔÓÃÓÚÆô¶¯¡¢×èÖ¹¡¢ÖØÆôÒÔ¼°Éó²éЧÀ͵Ä״̬¡£ÏÂÃ潫ÏÈÈݼ¸ÖÖ³£Óõķ½·¨À´ÖØÆôЧÀÍ¡£
1. ʹÓà systemctl ÖØÆôЧÀÍ
ÒªÖØÆôÒ»¸öЧÀÍ£¬¿ÉÒÔʹÓÃÒÔÏÂÏÂÁ
sudo systemctl restart ЧÀÍÃû³Æ
µÇ¼ºó¸´ÖÆ
ÀýÈ磬ҪÖØÆô nginx ЧÀÍ£¬¿ÉÒÔʹÓÃÒÔÏÂÏÂÁ
sudo systemctl restart nginx
µÇ¼ºó¸´ÖÆ
2. ×èÖ¹ºÍÆô¶¯Ð§ÀÍ
ÓÐʱ¼ä£¬ÖØÆôЧÀͲ¢²»ÊÇÒ»¸öºÃµÄÑ¡Ôñ£¬¿ÉÄÜ»áÓÐһЩ²»¿ÉÕ¹ÍûµÄÎÊÌⱬ·¢¡£ÔÚÕâÖÖÇéÐÎÏ£¬¿ÉÒÔÏÈ×èֹЧÀÍ£¬È»ºóÔÙÆô¶¯Ð§ÀÍ¡£¿ÉÒÔʹÓÃÒÔÏÂÏÂÁîʵÏÖ£º
×èֹЧÀÍ£º
sudo systemctl stop ЧÀÍÃû³Æ
µÇ¼ºó¸´ÖÆ
Æô¶¯Ð§ÀÍ£º
sudo systemctl start ЧÀÍÃû³Æ
µÇ¼ºó¸´ÖÆ
3. ÖØÔØÉèÖÃ
ÓÐЩЧÀÍÔÚÉèÖÃÎļþ±¬·¢×ª±äºóÐèÒªÖØмÓÔØÉèÖ㬴Ëʱ¿ÉÒÔʹÓà reload ÏÂÁËü»áÖØмÓÔØЧÀ͵ÄÉèÖöø²»ÐèÒªÖØÆôÕû¸öЧÀÍ¡£¿ÉÒÔʹÓÃÒÔÏÂÏÂÁî:
sudo systemctl reload ЧÀÍÃû³Æ
µÇ¼ºó¸´ÖÆ
4. Éó²éЧÀÍ״̬
ÈôÊÇÏëÏàʶЧÀ͵ÄÄ¿½ñ״̬£¬¿ÉÒÔʹÓà status ÏÂÁ
sudo systemctl status ЧÀÍÃû³Æ
µÇ¼ºó¸´ÖÆ
ÕâÑù¿ÉÒÔÉó²éЧÀÍÊÇ·ñÕý³£ÔËÐУ¬ÒÔ¼°ÊÇ·ñÓÐÈκÎÎÊÌâ¡£
×ܵÄÀ´Ëµ£¬Ê¹Óà systemctl ÏÂÁîÀ´ÖÎÀíЧÀÍÊÇ×î³£¼ûÒ²ÊÇ×îÀû±ãµÄ·½·¨¡£µ±ÖØÆôЧÀÍʱ£¬×îºÃÏÈ×èÖ¹ÔÙÆô¶¯£¬È·±£Ð§À͵Ä״̬ÊÇ׼ȷµÄ¡£Í¬Ê±£¬Ò²¿ÉÒÔͨ¹ý reload ÏÂÁîÀ´ÖØмÓÔØÉèÖÃÎļþ£¬×èÖ¹ÖØÆôÕû¸öЧÀÍ¡£
Ï£ÍûÒÔÉÏÄÚÈÝ¿ÉÒÔ×ÊÖúµ½Äã׼ȷµØÖØÆô Linux ЧÀÍ¡£×£ÄãÔÚʹÓà Linux ϵͳʱ˳Ë죡
ÒÔÉϾÍÊÇLinux ÖØÆôЧÀ͵Ä׼ȷ·½·¨ÊÇʲô£¿µÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡