{"id":289928,"date":"2024-02-11T21:17:35","date_gmt":"2024-02-11T13:17:35","guid":{"rendered":"https:\/\/lrxjmw.cn\/ldsrwrzyhqsg.html"},"modified":"2024-02-11T21:17:35","modified_gmt":"2024-02-11T13:17:35","slug":"ldsrwrzyhqsg","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/ldsrwrzyhqsg.html","title":{"rendered":"Linux\u5b9a\u65f6\u4efb\u52a1\u65e5\u5fd7\u4f18\u5316\uff0c\u8f7b\u677e\u7ba1\u7406\u4efb\u52a1\u6267\u884c\u72b6\u51b5"},"content":{"rendered":"

\u5728\u65e5\u5e38\u670d\u52a1\u5668\u7ba1\u7406\u65f6\uff0c\u65f6\u5e38\u78b0\u5230\u9700\u8981\u5b9a\u65f6\u8fd0\u884c\u67d0\u4e9b\u4efb\u52a1\u7684\u9700\u6c42\uff0c\u56e0\u6b64\u5bf9\u4e8e\u8fd9\u4e9b\u5b9a\u65f6\u4efb\u52a1\u7684\u8fd0\u884c\u72b6\u51b5\u8fdb\u884c\u6e05\u6670\u8bb0\u5f55\u5c31\u663e\u5f97\u5c24\u4e3a\u91cd\u8981\uff0c\u8fd9\u5c06\u5bf9\u540e\u671f\u7684\u68c0\u67e5\u53ca\u4f18\u5316\u4ea7\u751f\u5f88\u5927\u5e2e\u52a9\u3002\u672c\u6587\u6211\u4eec\u6765\u804a\u4e0b\u5982\u4f55\u4f18\u5316Linux<\/a>\u5b9a\u65f6\u4efb\u52a1\u6267\u884c\u65e5\u5fd7\uff0c\u4f7f\u60a8\u80fd\u66f4\u9ad8\u6548\u5730\u7ba1\u7406\u4e0e\u76d1\u63a7\u7535\u8111\u4e2d\u7684\u5b9a\u65f6\u4efb\u52a1\u3002<\/p>\n

1.\u786e\u5b9a\u65e5\u5fd7\u8def\u5f84\u548c\u683c\u5f0f<\/b><\/p>\n

\u9996\u5148\uff0c\u8bf7\u8003\u8651\u9009\u62e9\u5b9a\u65f6\u4efb\u52a1\u6267\u884c\u65e5\u5fd7\u5b58\u50a8\u4f4d\u7f6e\u53ca\u683c\u5f0f\u3002\u6b63\u5e38\u6765\u8bb2\uff0c\u5efa\u8bae\u4ee5\u7279\u5b9a\u6587\u4ef6\u4f5c\u4e3a\u5b58\u50a8\u5a92\u4ecb\uff0c\u4e14\u91c7\u7528\u901a\u7528\u7684\u683c\u5f0f\u6765\u8be6\u7ec6\u8bb0\u5f55\u4efb\u52a1\u7684\u6267\u884c\u72b6\u51b5\u3002\u6bd4\u5982\uff0c\u5c06\u65e5\u5fd7\u5b58\u653e\u5728\/var\/log\/cron\u6b64\u76ee\u5f55linux\u5b9a\u65f6\u4efb\u52a1\u6267\u884c\u65e5\u5fd7<\/strong>\uff0c\u540c\u65f6\u91c7\u7528\u4f17\u6240\u5468\u77e5\u7684syslog\u683c\u5f0f\u6765\u8fdb\u884c\u8bb0\u5f55\u5373\u53ef\u3002<\/p>\n

2.\u8bbe\u7f6e\u5408\u9002\u7684\u65e5\u5fd7\u7ea7\u522b<\/b><\/p>\n

\u4e3a\u4fbf\u4e8e\u540e\u671f\u5206\u6790\u548c\u7b5b\u9009\uff0c\u6211\u4eec\u53ef\u6309\u4efb\u52a1\u91cd\u8981\u7a0b\u5ea6\u8bbe\u5b9a\u76f8\u5e94\u7684\u65e5\u5fd7\u7b49\u7ea7\u5206\u7c7b\u3002\u5bf9\u5173\u952e\u4efb\u52a1\uff0c\u5efa\u8bae\u4f7f\u7528\u8f83\u9ad8\u7684\u7ea7\u522b\uff08\u5982Error\u6216Critical\uff09\u8bb0\u5f55\uff0c\u5bf9\u65e5\u5e38\u4efb\u52a1\uff0c\u5219\u53ef\u9009\u8f83\u4f4e\u7ea7\u522b\u7684\u8bbe\u7f6e(\u5982Info\u6216Debug)\u3002\u5982\u6b64\u4e00\u6765\uff0c\u6211\u4eec\u4fbf\u80fd\u6709\u6548\u5730\u5229\u7528\u7ea7\u522b\u8fc7\u6ee4\u65e5\u5fd7\uff0c\u63d0\u5347\u5de5\u4f5c\u6548\u7387\u54e6\uff01<\/p>\n

3.\u6dfb\u52a0\u65f6\u95f4\u6233<\/b><\/p>\n

\u4e3a\u63d0\u9ad8\u4efb\u52a1\u8ddf\u8e2a\u6548\u7387\uff0c\u6211\u4eec\u5efa\u8bae\u60a8\u4e3a\u6bcf\u4e2a\u65e5\u5fd7\u7eaa\u5f55\u6ce8\u5165\u51c6\u786e\u7684\u65f6\u95f4\u6233\u4fe1\u606f\uff0c\u4fbf\u4e8e\u7cbe\u51c6\u638c\u63e1\u4efb\u52a1\u7684\u8fd0\u884c\u65f6\u523b\u4e0e\u6240\u9700\u65f6\u957f\u3002\u53ef\u901a\u8fc7\u4f7f\u7528date\u547d\u4ee4<\/a>\u8f7b\u677e\u83b7\u53d6\u5f53\u524d\u65f6\u95f4\u5e76\u6dfb\u52a0\u5165\u65e5\u5fd7\u8bb0\u5f55\u4e4b\u4e2d\u3002<\/p>\n

linux\u8ba1\u5212\u4efb\u52a1\u6267\u884c\u65e5\u5fd7_linux\u5b9a\u65f6\u4efb\u52a1\u6267\u884c\u65e5\u5fd7_linux\u5b9a\u65f6\u8ba1\u5212\u4efb\u52a1<\/p>\n

4.\u8bb0\u5f55\u5173\u952e\u4fe1\u606f<\/b><\/p>\n

\u9664\u65f6\u95f4\u6233\u5916\uff0c\u6211\u4eec\u4e5f\u4f1a\u5728\u6b64\u65e5\u5fd7\u4e2d\u914d\u9001\u5176\u4ed6\u6838\u5fc3\u8be6\u60c5\uff0c\u4ee5\u8f85\u52a9\u672a\u6765\u7684\u6df1\u5165\u7814\u7a76\u3002\u6bd4\u5982\u4efb\u52a1\u540d\u79f0\u3001\u6267\u884c\u6210\u679c\u3001\u9519\u8bef\u8baf\u606f\u7b49\u7b49\uff0c\u8fd9\u4e9b\u90fd\u80fd\u5e2e\u60a8\u66f4\u6e05\u6670\u5730\u628a\u63e1\u4efb\u52a1\u8fdb\u5ea6\uff0c\u53ca\u65f6\u89e3\u51b3\u53ef\u80fd\u51fa\u73b0\u7684\u95ee\u9898\u54e6\uff01<\/p>\n

5.\u4f7f\u7528\u5408\u9002\u7684\u65e5\u5fd7\u5de5\u5177<\/b><\/p>\n

linux\u8ba1\u5212\u4efb\u52a1\u6267\u884c\u65e5\u5fd7_linux\u5b9a\u65f6\u4efb\u52a1\u6267\u884c\u65e5\u5fd7_linux\u5b9a\u65f6\u8ba1\u5212\u4efb\u52a1<\/p>\n

\u4e3a\u4e86\u66f4\u6709\u6548\u5730\u7ba1\u7406\u5e76\u67e5\u770b\u5b9a\u65f6\u4efb\u52a1\u7684\u8fd0\u4f5c\u72b6\u51b5\uff0c\u5efa\u8bae\u60a8\u5c1d\u8bd5\u4ee5\u4e0b\u4e13\u4e1a\u5de5\u5177\uff1a\u5229\u7528logrotate\uff0c\u6211\u4eec\u80fd\u591f\u5b9a\u671f\u8c03\u6574\u65e5\u5fd7\u6587\u4ef6\u5927\u5c0f\u4ee5\u9632\u5de8\u5927\u7684\u6d88\u8017\uff1b\u901a\u8fc7\u8fd0\u7528grep\u6216awk\u6307\u4ee4\uff0c\u6211\u4eec\u53ef\u6328\u4e2a\u68c0\u7d22\u5173\u952e\u8bcd\u6216\u8005\u6df1\u5165\u5206\u6790\u65e5\u5fd7\u4fe1\u606f\uff0c\u4ee5\u6b64\u4e86\u89e3\u7279\u5b9a\u4efb\u52a1\u7684\u8868\u73b0\u4ee5\u53ca\u4efb\u52a1\u7684\u6267\u884c\u9891\u7387\u4e0e\u9700\u8981\u65f6\u95f4\u7684\u5e73\u5747\u503c\u7b49\u5173\u952e\u6570\u636e\u3002<\/p>\n

6.\u5b9a\u65f6\u6e05\u7406\u65e0\u7528\u65e5\u5fd7<\/b><\/p>\n

\u4e3a\u9632\u6b62\u670d\u52a1\u5668\u5b58\u50a8\u7a7a\u95f4\u8017\u5c3d\uff0c\u9700\u5b9a\u671f\u6e05\u7406\u65e0\u7528\u7684\u5b9a\u65f6\u4efb\u52a1\u6267\u884c\u65e5\u5fd7\u3002\u60a8\u53ef\u542f\u7528cron\u5b9a\u65f6\u4efb\u52a1\u6765\u81ea\u52a8\u6e05\u7406\u65e7\u65e5\u5fd7\u5e76\u4fdd\u5b58\u8fd1\u671f\u8bb0\u5f55\u3002<\/p>\n

7.\u8bbe\u7f6e\u544a\u8b66\u673a\u5236<\/b><\/p>\n

\u4e3a\u4e86\u786e\u4fdd\u4efb\u52a1\u6267\u884c\u987a\u7545\uff0c\u6211\u4eec\u53ef\u8bbe\u7acb\u544a\u8b66\u7cfb\u7edf<\/a>\u3002\u501f\u52a9\u76d1\u63a7\u5de5\u5177\uff08\u6bd4\u5982Zabbix\uff09\u5bf9\u5b9a\u65f6\u4efb\u52a1\u8fdb\u884c24\u5c0f\u65f6\u5b9e\u65f6\u76d1\u6d4b\uff0c\u82e5\u51fa\u73b0\u5f02\u5e38\u72b6\u51b5\uff0c\u4fbf\u4f1a\u5373\u65f6\u53d1\u51fa\u8b66\u62a5\u3002\u5982\u6b64\u4e00\u6765\uff0c\u6211\u4eec\u80fd\u591f\u8fc5\u901f\u4ecb\u5165\u5904\u7406\uff0c\u9632\u6b62\u95ee\u9898\u6076\u5316\u6269\u5927\u3002<\/p>\n

8.\u5b9a\u671f\u5206\u6790\u4f18\u5316<\/b><\/p>\n

\u5728\u6b64\u8fc7\u7a0b\u4e2d\uff0c\u9664\u4e86\u5b9a\u671f\u5ba1\u67e5\u548c\u76d1\u89c6\u5b9a\u65f6\u4efb\u52a1\u7684\u6267\u884c\u4e4b\u5916\uff0c\u6211\u4eec\u4e5f\u4f1a\u7ed3\u5408\u65e5\u5fd7\u6570\u636e\u6df1\u5165\u7ec6\u81f4\u5730\u5206\u6790\u4e0e\u4f18\u5316\u3002\u8be6\u7ec6\u6765\u8bf4linux\u7cfb\u7edf\u5b89\u88c5\u6559\u7a0b\uff0c\u5c31\u662f\u4ece\u65e5\u5fd7\u6570\u636e\u4e2d\u53d1\u6398\u6267\u884c\u8017\u65f6\u8f83\u591a\u7684\u4efb\u52a1\uff0c\u7136\u540e\u5bfb\u627e\u63d0\u5347\u5176\u6548\u7387\u7684\u673a\u4f1a\u3002\u540c\u65f6\uff0c\u6211\u4eec\u4e5f\u4f1a\u7528\u5fc3\u9605\u8bfb\u6545\u969c\u65e5\u5fd7\uff0c\u4ee5\u671f\u5bfb\u627e\u5230\u90a3\u4e9b\u666e\u904d\u5b58\u5728\u7684\u95ee\u9898\uff0c\u4ece\u800c\u5236\u8ba2\u9488\u5bf9\u6027\u5f3a\u7684\u5e94\u5bf9\u7b56\u7565\u3002\u6301\u7eed\u575a\u6301\u8fd9\u79cd\u7ec6\u5fc3\u5ba1\u67e5\u4e0e\u4f18\u5316\uff0c\u5b9a\u80fd\u5927\u5927\u6539\u5584\u670d\u52a1\u5668\u7684\u8fd0\u884c\u7a33\u5b9a\u6027\u53ca\u6027\u80fd\u6c34\u5e73\u3002<\/p>\n

9.\u53c2\u8003\u4f18\u79c0\u5b9e\u8df5<\/b><\/p>\n

\u6700\u540e\uff0c\u5efa\u8bae\u60a8\u9002\u5f53\u501f\u9274\u4ed6\u4eba\u7684\u6210\u529f\u5b9e\u8df5\u4ee5\u83b7\u53d6\u6709\u76ca\u7684\u7ba1\u7406\u53ca\u4f18\u5316\u5b9a\u65f6\u4efb\u52a1\u6267\u884c\u65e5\u5fd7\u7684\u7ecf\u9a8c\u548c\u7075\u611f\u3002\u6bd4\u5982linux\u5b9a\u65f6\u4efb\u52a1\u6267\u884c\u65e5\u5fd7<\/strong>\uff0c\u9605\u89c8\u4e13\u4e1a\u6280\u672f\u535a\u5ba2\u6216\u8bba\u575b\u4e0a\u7684\u76f8\u5173\u4fe1\u606f\uff0c\u6df1\u5165\u4e86\u89e3\u5176\u4ed6\u7ba1\u7406\u8005\u4eec\u7684\u7b56\u7565\u4e0e\u65b9\u6cd5\u3002\u6b64\u5916\uff0c\u79ef\u6781\u53c2\u4e0e\u5404\u79cd\u6280\u672f\u7814\u8ba8\u4f1a\u6216\u8005\u793e\u4ea4\u6d3b\u52a8\uff0c\u501f\u6b64\u673a\u4f1a\u4e0e\u5176\u4ed6\u7ba1\u7406\u5458\u4eec\u5c55\u5f00\u53cb\u597d\u7684\u4ea4\u6d41\u548c\u5fc3\u5f97\u5206\u4eab\u3002<\/p>\n

\u901a\u8fc7\u5b9e\u65bd\u8fd9\u4e9b\u7cbe\u5999\u7684\u6539\u8fdb\u7a8d\u95e8\uff0c\u5404\u4f4d\u80fd\u66f4\u6709\u6548\u5730\u638c\u63a7\u548c\u76d1\u63a7Linux\u5b9a\u65f6\u4efb\u52a1\u6267\u884c\u65e5\u5fd7\u3002\u4e0d\u8bba\u4f60\u662f\u4e2a\u4eba\u7f16\u7a0b\u7231\u597d\u8005\u6216\u662f\u4e13\u4e1a\u4f01\u4e1a\u7ba1\u7406\u5458linux\u7cfb\u7edf\u5b98\u7f51\uff0c\u90fd\u80fd\u56e0\u6b64\u63d0\u5347\u5de5\u4f5c\u6548\u7387\uff0c\u53ca\u65f6\u5bdf\u89c9\u5e76\u89e3\u51b3\u95ee\u9898\u3002\u613f\u6b64\u7bc7\u6587\u7ae0\u52a9\u60a8\u5728\u670d\u52a1\u5668\u7ba1\u7406\u9886\u57df\u4e0a\u66f4\u4e0a\u5c42\u697c\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"

\u672c\u6587\u6211\u4eec\u6765\u804a\u4e0b\u5982\u4f55\u4f18\u5316Linux\u5b9a\u65f6\u4efb\u52a1\u6267\u884c\u65e5\u5fd7\uff0c\u4f7f\u60a8\u80fd\u66f4\u9ad8\u6548\u5730\u7ba1\u7406\u4e0e\u76d1\u63a7\u7535\u8111\u4e2d\u7684\u5b9a\u65f6\u4efb\u52a1\u3002<\/p>\n","protected":false},"author":1,"featured_media":289929,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-289928","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/289928","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=289928"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/289928\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/289929"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=289928"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=289928"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=289928"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}