linuxЧÀÍÆ÷ÈÕÖ¾Ò»Ñùƽ³£·ÅÔÚÄÇÀï
linuxЧÀÍÆ÷ÈÕÖ¾Ò»Ñùƽ³£ÔÚ£º1¡¢/var/log/Ŀ¼£¬°üÀ¨ÏµÍ³ºÍЧÀ͵Ĵ󲿷ÖÈÕÖ¾Îļþ£»2¡¢/var/log/nginx/£¬nginx×÷ΪwebЧÀÍÆ÷ʱ£»3¡¢/var/log/apache2/ »ò /var/log/httpd/£¬apache×÷ΪwebЧÀÍÆ÷ʱ£»4¡¢/var/log/mysql/ »ò /var/log/mariadb/£¬mysql»òmariadbÊý¾Ý¿âЧÀÍÆ÷ʱ¡£
±¾½Ì³Ì²Ù×÷ϵͳ£ºLinux5.18.14ϵͳ¡¢Dell G3µçÄÔ¡£
ÔÚLinuxЧÀÍÆ÷ÉÏ£¬³£¼ûµÄÈÕÖ¾ÎļþÒ»Ñùƽ³£´æ´¢ÔÚÒÔÏÂλÖãº
1¡¢/var/log/£º
Õâ¸öĿ¼Ï°üÀ¨ÁËϵͳºÍЧÀ͵Ĵ󲿷ÖÈÕÖ¾Îļþ¡£ÆäÖÐһЩ³£¼ûµÄÈÕÖ¾Îļþ°üÀ¨£º
/var/log/messages£ºÏµÍ³µÄÕûÌåÈÕÖ¾ÐÂÎÅ£¬°üÀ¨Äںˡ¢Ð§ÀͺÍÆäËûÖ÷ÒªÊÂÎñµÄ¼Í¼¡£
/var/log/syslog£ºÏµÍ³ÈÕÖ¾Îļþ£¬°üÀ¨ÏµÍ³³ÌÐòºÍЧÀ͵ÄÐÂÎÅ¡£
/var/log/auth.log£ºÊÚȨºÍÉí·ÝÑéÖ¤Ïà¹ØµÄÈÕÖ¾£¬¼Í¼ÁËÓû§µÇ¼¡¢suÏÂÁîµÈÐÅÏ¢¡£
/var/log/dmesg£ºÄں˻·»º³åÇøµÄÐÂÎÅ£¬°üÀ¨ÁË¿ª»úʱ´úµÄÆô¶¯ÐÅÏ¢¡£
2¡¢/var/log/nginx/£º
ÈôÊÇÄúʹÓÃNginx×÷ΪWebЧÀÍÆ÷£¬Ïà¹ØµÄÈÕÖ¾Îļþͨ³£´æ´¢ÔÚÕâ¸öĿ¼Ï¡£
3¡¢/var/log/apache2/ »ò /var/log/httpd/£º
ÈôÊÇÄúʹÓÃApache×÷ΪWebЧÀÍÆ÷£¬Ïà¹ØµÄÈÕÖ¾Îļþͨ³£´æ´¢ÔÚÕâ¸öĿ¼Ï¡£
4¡¢/var/log/mysql/ »ò /var/log/mariadb/£º
ÈôÊÇÄúʹÓÃMySQL»òMariaDBÊý¾Ý¿âЧÀÍÆ÷£¬Ïà¹ØµÄÈÕÖ¾Îļþͨ³£´æ´¢ÔÚÕâ¸öĿ¼Ï¡£
Çë×¢ÖØ£¬ÏêϸµÄÈÕÖ¾ÎļþλÖÿÉÄÜÒòLinux¿¯Ðа桢ӦÓóÌÐòºÍÉèÖöøÓÐËù²î±ð¡£ÔÚijЩÇéÐÎÏ£¬Äú¿ÉÄÜÐèÒªÉó²éÏìÓ¦µÄÉèÖÃÎļþÀ´È·¶¨ÈÕÖ¾ÎļþµÄλÖᣱðµÄ£¬»¹¿ÉÒÔʹÓÃÏÂÁîÈçjournalctlÀ´Éó²éϵͳÈÕÖ¾ºÍЧÀÍÈÕÖ¾¡£
ÒÔÉϾÍÊÇlinuxЧÀÍÆ÷ÈÕÖ¾Ò»Ñùƽ³£·ÅÔÚÄÇÀïµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡