{"id":32608,"date":"2026-08-14T10:00:00","date_gmt":"2026-08-14T02:00:00","guid":{"rendered":"https:\/\/cn.hostease.com\/blog\/?p=32608"},"modified":"2026-08-16T19:51:44","modified_gmt":"2026-08-16T11:51:44","slug":"logrotate-linux-system-log","status":"publish","type":"post","link":"https:\/\/cn.hostease.com\/blog\/guides\/logrotate-linux-system-log\/","title":{"rendered":"logrotate \u914d\u7f6e\u5b9e\u6218\uff1a\u9632\u6b62 Linux \u7cfb\u7edf\u65e5\u5fd7\u6324\u6ee1\u6839\u5206\u533a"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/cn.hostease.com\/blog\/wp-content\/uploads\/2026\/08\/logrotate-linux-system-log-cover.webp\" alt=\"logrotate \u914d\u7f6e\u5c01\u9762\" loading=\"lazy\" \/><\/p>\n<p>\u8fd9\u7bc7\u6307\u5357\u5e2e\u52a9\u4f60\u914d\u7f6e logrotate\uff08Linux \u65e5\u5fd7\u8f6e\u8f6c\u5de5\u5177\uff09\u9632\u6b62\u7cfb\u7edf\u65e5\u5fd7\u6324\u6ee1\u6839\u5206\u533a\uff1a\u6838\u5fc3\u914d\u7f6e\u9879\u3001\u6d4b\u8bd5\u65b9\u6cd5\u548c\u5e38\u89c1\u95ee\u9898\u6392\u67e5\u3002Linux \u9ed8\u8ba4\u5b89\u88c5\u4e86 logrotate \u4f46\u914d\u7f6e\u4e0d\u4e00\u5b9a\u7b26\u5408\u5b9e\u9645\u751f\u4ea7\u73af\u5883\uff0c\u9700\u8981\u6839\u636e\u65e5\u5fd7\u589e\u957f\u91cf\u548c\u78c1\u76d8\u5bb9\u91cf\u8c03\u6574\u3002<\/p>\n<p>\u5982\u679c\u4f60\u7684\u670d\u52a1\u5668\u65e5\u5fd7\u589e\u957f\u5feb\u4f46 logrotate \u6ca1\u53ca\u65f6\u6e05\u7406\uff0c\u6839\u5206\u533a\u53ef\u80fd\u88ab\u586b\u6ee1\u5bfc\u81f4\u7cfb\u7edf\u65e0\u6cd5\u542f\u52a8\u3002Hostease \u4e2d\u6587\u535a\u5ba2\u7684 <a href=\"https:\/\/cn.hostease.com\/blog\/guides\/container-security-hardening\/\">\u5bb9\u5668\u5b89\u5168\u52a0\u56fa<\/a>\u5173\u6ce8\u5e94\u7528\u5c42\u5b89\u5168\uff0c\u672c\u6587\u5173\u6ce8\u64cd\u4f5c\u7cfb\u7edf\u5c42\u7684\u65e5\u5fd7\u7ba1\u7406\u3002\u65e5\u5fd7\u7ba1\u7406\u662f\u65e5\u5e38\u8fd0\u7ef4\u5e38\u88ab\u5ffd\u89c6\u4f46\u51fa\u95ee\u9898\u65f6\u5f71\u54cd\u4e25\u91cd\u7684\u5c0f\u9879\u3002<\/p>\n<h2>\u4e00\u3001logrotate \u5de5\u4f5c\u539f\u7406<\/h2>\n<p>logrotate \u6309\u9884\u8bbe\u89c4\u5219\u5b9a\u671f\u8f6e\u8f6c\u65e5\u5fd7\u6587\u4ef6\uff0c\u5305\u62ec\u538b\u7f29\u3001\u5220\u9664\u8fc7\u671f\u65e5\u5fd7\u3001\u521b\u5efa\u65b0\u65e5\u5fd7\u6587\u4ef6\u3002\u5b83\u7684\u8fd0\u884c\u4f9d\u8d56 cron\uff08Linux \u5b9a\u65f6\u4efb\u52a1\uff09\u6bcf\u5929\u6267\u884c\uff0c\u68c0\u67e5\u6240\u6709\u914d\u7f6e\u6bb5\u662f\u5426\u6ee1\u8db3\u8f6e\u8f6c\u6761\u4ef6\u3002<\/p>\n<p>\u9ed8\u8ba4\u914d\u7f6e\u6587\u4ef6 \/etc\/logrotate.conf \u4f1a\u5305\u542b \/etc\/logrotate.d\/ \u4e0b\u7684\u6240\u6709\u914d\u7f6e\u6bb5\uff0c\u5927\u591a\u6570\u670d\u52a1\u7684\u65e5\u5fd7\u8f6e\u8f6c\u914d\u7f6e\u90fd\u5728\u8fd9\u4e2a\u76ee\u5f55\u3002\u4f8b\u5982 syslog\u3001nginx\u3001apache\u3001mysql \u7b49\u90fd\u6709\u81ea\u5df1\u7684\u8f6e\u8f6c\u914d\u7f6e\u3002\u4fee\u6539\u914d\u7f6e\u524d\u5148\u7406\u89e3\u73b0\u6709\u89c4\u5219\uff0c\u907f\u514d\u8986\u76d6\u5bfc\u81f4\u65e5\u5fd7\u4e22\u5931\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cn.hostease.com\/blog\/wp-content\/uploads\/2026\/08\/logrotate-linux-system-log-flow.webp\" alt=\"logrotate \u8f6e\u8f6c\u6d41\u7a0b\" loading=\"lazy\" \/><\/p>\n<h2>\u4e8c\u3001\u6838\u5fc3\u914d\u7f6e\u9879\u89e3\u6790<\/h2>\n<p>\u4e00\u4e2a\u6807\u51c6\u7684 logrotate \u914d\u7f6e\u6bb5\u793a\u4f8b\uff1a<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-linenumbers=\"false\">\/var\/log\/nginx\/*.log {\n    daily\n    rotate 7\n    missingok\n    notifempty\n    compress\n    delaycompress\n    create 0640 www-data adm\n    sharedscripts\n    postrotate\n        systemctl reload nginx\n    endscript\n}<\/pre>\n<p>\u5173\u952e\u53c2\u6570\u542b\u4e49\uff1a<\/p>\n<ul>\n<li><strong>daily\/weekly\/monthly<\/strong>\uff1a\u8f6e\u8f6c\u9891\u7387\u3002\u751f\u4ea7\u73af\u5883\u6839\u636e\u65e5\u5fd7\u589e\u957f\u901f\u5ea6\u9009\u62e9\u3002<\/li>\n<li><strong>rotate N<\/strong>\uff1a\u4fdd\u7559\u7684\u5f52\u6863\u6570\u91cf\u3002\u8d85\u8fc7 N \u4e2a\u6700\u8001\u7684\u4f1a\u88ab\u5220\u9664\u3002<\/li>\n<li><strong>missingok<\/strong>\uff1a\u65e5\u5fd7\u6587\u4ef6\u4e0d\u5b58\u5728\u65f6\u4e0d\u62a5\u9519\u3002\u9002\u5408\u8f6e\u8f6c\u4efb\u52a1\u8dd1\u5728\u65e5\u5fd7\u751f\u6210\u4e4b\u524d\u3002<\/li>\n<li><strong>notifempty<\/strong>\uff1a\u7a7a\u6587\u4ef6\u4e0d\u8f6e\u8f6c\u3002<\/li>\n<li><strong>compress<\/strong>\uff1a\u538b\u7f29\u5f52\u6863\u3002delaycompress \u5ef6\u8fdf\u538b\u7f29\u4e0a\u4e00\u4e2a\u5f52\u6863\uff0c\u8ba9\u53ef\u80fd\u8fd8\u5728\u8bfb\u53d6\u7684\u670d\u52a1\u6b63\u5e38\u9000\u51fa\u3002<\/li>\n<li><strong>sharedscripts<\/strong>\uff1a\u6240\u6709\u65e5\u5fd7\u8f6e\u8f6c\u540e\u624d\u6267\u884c\u4e00\u6b21 postrotate\uff0c\u907f\u514d\u670d\u52a1\u88ab\u9891\u7e41\u91cd\u542f\u3002<\/li>\n<li><strong>postrotate<\/strong>\uff1a\u8f6e\u8f6c\u540e\u6267\u884c\u7684\u547d\u4ee4\uff0c\u901a\u5e38\u662f\u901a\u77e5\u670d\u52a1\u91cd\u65b0\u6253\u5f00\u65e5\u5fd7\u6587\u4ef6\u3002<\/li>\n<\/ul>\n<h2>\u4e09\u3001\u5224\u65ad\u65e5\u5fd7\u589e\u957f\u91cf<\/h2>\n<p>\u914d\u7f6e\u8f6e\u8f6c\u7b56\u7565\u524d\u5148\u8bc4\u4f30\u65e5\u5fd7\u589e\u957f\u91cf\u3002\u7528 du -sh \u67e5\u770b\u5f53\u524d\u65e5\u5fd7\u5927\u5c0f\uff0c\u89c2\u5bdf\u4e00\u6bb5\u65f6\u95f4\u7684\u589e\u957f\u7387\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-linenumbers=\"false\">du -sh \/var\/log\/*.log\nls -lh \/var\/log\/nginx\/<\/pre>\n<p>\u5bf9\u4e8e nginx access.log \u8fd9\u79cd\u9ad8\u9891\u8bbf\u95ee\u65e5\u5fd7\uff0c\u5355\u6587\u4ef6\u53ef\u80fd\u6bcf\u5929\u51e0\u767e MB\u3002\u8f6e\u8f6c\u9891\u7387\u548c\u4fdd\u7559\u6570\u91cf\u8981\u6309\u8fd9\u4e2a\u91cf\u8ba1\u7b97\uff1a\u6bcf\u5929\u8f6e\u8f6c\u3001\u4fdd\u7559 7 \u4e2a\u5f52\u6863\uff0c\u5927\u7ea6\u4e00\u5468\u7684\u65e5\u5fd7\u91cf\u3002\u5982\u679c\u78c1\u76d8\u7a7a\u95f4\u7d27\u5f20\uff0c\u628a\u4fdd\u7559\u6570\u91cf\u51cf\u5230 3-4\uff0c\u6216\u7528 weekly \u66ff\u4ee3 daily\u3002<\/p>\n<p>\u5982\u679c\u4f60\u7684\u670d\u52a1\u65e5\u5fd7\u7279\u522b\u5927\uff08\u5982 ELK \u6536\u96c6\u6216\u5ba1\u8ba1\u65e5\u5fd7\uff09\uff0c\u8003\u8651\u7528\u5176\u4ed6\u5b58\u50a8\u65b9\u6848\u800c\u4e0d\u662f\u672c\u5730\u6587\u4ef6\u7cfb\u7edf\u3002\u5927\u91cf\u5c0f\u6587\u4ef6\u5bf9 inode\uff08\u6587\u4ef6\u7cfb\u7edf\u7684\u7d22\u5f15\u8282\u70b9\uff09\u6d88\u8017\u4e5f\u5f88\u5feb\uff0c\u5206\u533a\u7a7a\u95f4\u53ef\u80fd\u6ca1\u6ee1\u4f46 inode \u7528\u5b8c\u4e86\u3002<\/p>\n<h2>\u56db\u3001\u914d\u7f6e\u6d4b\u8bd5\u65b9\u6cd5<\/h2>\n<p>\u4fee\u6539 logrotate \u914d\u7f6e\u540e\u5fc5\u987b\u6d4b\u8bd5\u3002\u7528 -d \u53c2\u6570\u6a21\u62df\u8fd0\u884c\uff0c\u786e\u8ba4\u914d\u7f6e\u6b63\u786e\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-linenumbers=\"false\">logrotate -d \/etc\/logrotate.d\/nginx\nlogrotate -f \/etc\/logrotate.d\/nginx<\/pre>\n<p>-d \u662f dry run\uff08\u7a7a\u8dd1\uff09\uff0c\u4f1a\u6253\u5370\u4f1a\u6267\u884c\u7684\u64cd\u4f5c\u4f46\u4e0d\u505a\u5b9e\u9645\u4fee\u6539\u3002\u786e\u8ba4\u8f93\u51fa\u7b26\u5408\u9884\u671f\u540e\uff0c\u53bb\u6389 -d \u5b9e\u9645\u8fd0\u884c\u3002-f \u5f3a\u5236\u6267\u884c\uff0c\u4e0d\u7b49\u8f6e\u8f6c\u5468\u671f\u3002\u5982\u679c logrotate \u62a5\u9519\u8bf4\u6743\u9650\u4e0d\u8db3\uff0c\u68c0\u67e5 \/var\/lib\/logrotate\/ \u76ee\u5f55\u7684\u5199\u5165\u6743\u9650\u3002\u914d\u7f6e\u9519\u8bef\u8fd8\u4f1a\u5bfc\u81f4\u670d\u52a1\u6536\u4e0d\u5230 SIGHUP\uff08Unix \u4fe1\u53f7\uff0c\u7528\u4e8e\u901a\u77e5\u670d\u52a1\u91cd\u65b0\u52a0\u8f7d\u914d\u7f6e\uff09\u4fe1\u53f7\uff0c\u65b0\u7684\u65e5\u5fd7\u7ee7\u7eed\u5199\u5165\u5df2\u8f6e\u8f6c\u7684\u6587\u4ef6\u3002<\/p>\n<p>logrotate \u5931\u8d25\u7684\u5e38\u89c1\u539f\u56e0\u5305\u62ec\uff1apostrotate \u547d\u4ee4\u6267\u884c\u5931\u8d25\uff08\u5982 systemctl \u4e0d\u5b58\u5728\uff09\u3001\u6743\u9650\u4e0d\u8db3\u3001\u914d\u7f6e\u8bed\u6cd5\u9519\u8bef\u3002\u5efa\u8bae\u5728 CI\uff08\u6301\u7eed\u96c6\u6210\uff09\u6d41\u7a0b\u4e2d\u52a0\u5165 logrotate \u914d\u7f6e\u8bed\u6cd5\u68c0\u67e5\uff1a<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-linenumbers=\"false\">for f in \/etc\/logrotate.d\/*; do\n    logrotate -d \"$f\" > \/dev\/null 2>&1 || echo \"Config error: $f\"\ndone<\/pre>\n<p>\u5982\u679c\u4f60\u7684\u670d\u52a1\u5668\u540c\u65f6\u8dd1\u591a\u4e2a\u670d\u52a1\uff0c\u6bcf\u4e2a\u670d\u52a1\u7684\u8f6e\u8f6c\u914d\u7f6e\u8981\u5355\u72ec\u7ba1\u7406\uff0c\u907f\u514d\u4e00\u4e2a\u670d\u52a1\u7684\u65e5\u5fd7\u6e05\u7406\u89c4\u5219\u5f71\u54cd\u53e6\u4e00\u4e2a\u670d\u52a1\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cn.hostease.com\/blog\/wp-content\/uploads\/2026\/08\/logrotate-linux-system-log-comparison.webp\" alt=\"\u8f6e\u8f6c\u7b56\u7565\u5bf9\u6bd4\" loading=\"lazy\" \/><\/p>\n<h2>\u4e94\u3001\u4e0e\u65e5\u5fd7\u7ba1\u7406\u7684\u914d\u5408<\/h2>\n<p>logrotate \u89e3\u51b3\u7684\u662f\u78c1\u76d8\u7a7a\u95f4\u95ee\u9898\uff0c\u4f46\u65e5\u5fd7\u7ba1\u7406\u8fd8\u9700\u8981\u8003\u8651\uff1a\u65e5\u5fd7\u6536\u96c6\uff08\u7528 filebeat\u3001fluentd \u7b49\u628a\u65e5\u5fd7\u8f6c\u53d1\u5230\u96c6\u4e2d\u5b58\u50a8\uff09\u3001\u65e5\u5fd7\u67e5\u8be2\uff08\u7528 Loki\u3001ES \u7b49\u652f\u6301\u5feb\u901f\u68c0\u7d22\uff09\u3001\u65e5\u5fd7\u544a\u8b66\uff08\u5173\u952e\u9519\u8bef\u5b9e\u65f6\u901a\u77e5\uff09\u3002logrotate \u662f\u65e5\u5fd7\u751f\u547d\u5468\u671f\u7684\u7b2c\u4e00\u73af\uff0c\u672c\u5730\u4fdd\u7559\u8fd1\u51e0\u5929\u7528\u4e8e\u6392\u67e5\uff0c\u8fdc\u7a0b\u4fdd\u7559\u5168\u90e8\u7528\u4e8e\u5ba1\u8ba1\u3002<\/p>\n<p>\u5bf9\u4e8e <a href=\"https:\/\/cn.hostease.com\/blog\/guides\/wordpress-security-hardening\/\">WordPress \u5b89\u5168\u52a0\u56fa<\/a>\u540e\u7684\u7ad9\u70b9\uff0cwp-content\/debug.log \u8fd9\u7c7b\u5e94\u7528\u65e5\u5fd7\u4e5f\u5efa\u8bae\u52a0\u5165 logrotate \u8f6e\u8f6c\u3002WordPress \u9ed8\u8ba4\u4f1a\u628a\u9519\u8bef\u5199\u5165\u8fd9\u4e2a\u6587\u4ef6\uff0c\u5982\u679c\u4e0d\u6e05\u7406\u53ef\u80fd\u6301\u7eed\u589e\u957f\u5bfc\u81f4\u78c1\u76d8\u586b\u6ee1\u3002\u5982\u679c\u4f7f\u7528 <a href=\"https:\/\/cn.hostease.com\/blog\/guides\/opentelemetry-tracing-cloud-server\/\">OpenTelemetry \u94fe\u8def\u8ffd\u8e2a<\/a>\uff0ctracing \u6570\u636e\u91cf\u66f4\u5927\uff0c\u66f4\u9700\u8981\u914d\u7f6e\u6709\u6548\u7684\u8f6e\u8f6c\u548c\u5f52\u6863\u7b56\u7565\u3002\u65e5\u5fd7\u8f6e\u8f6c\u4e5f\u8981\u548c <a href=\"https:\/\/cn.hostease.com\/blog\/guides\/mariadb-replication-lag\/\">\u6570\u636e\u5e93\u590d\u5236\u5ef6\u8fdf<\/a>\u76d1\u63a7\u914d\u5408\uff1a\u6570\u636e\u5e93 binlog \u548c redo log \u7684\u4fdd\u7559\u7b56\u7565\u901a\u5e38\u4e0d\u7531 logrotate \u7ba1\u7406\uff0c\u4f46\u9700\u8981\u7edf\u4e00\u89c4\u5212\u78c1\u76d8\u7a7a\u95f4\uff0c\u907f\u514d\u65e5\u5fd7\u8f6e\u8f6c\u91ca\u653e\u7684\u7a7a\u95f4\u53c8\u88ab\u6570\u636e\u5e93\u65e5\u5fd7\u5360\u6ee1\u3002<\/p>\n<h2>\u516d\u3001\u76d1\u63a7\u4e0e\u544a\u8b66<\/h2>\n<p>\u76d1\u63a7 \/var\/log \u76ee\u5f55\u7684\u7a7a\u95f4\u4f7f\u7528\u7387\uff0c\u914d\u7f6e\u544a\u8b66\u9608\u503c\u3002\u5f53\u7a7a\u95f4\u4f7f\u7528\u7387\u8d85\u8fc7 80% \u65f6\u63d0\u9192\uff0c\u8d85\u8fc7 90% \u65f6\u7d27\u6025\u544a\u8b66\u3002logrotate \u662f\u88ab\u52a8\u7684\u8f6e\u8f6c\u5de5\u5177\uff0c\u4e0d\u4f1a\u4e3b\u52a8\u6e05\u7406\u5386\u53f2\u65e5\u5fd7\uff0c\u9700\u8981\u914d\u5408\u76d1\u63a7\u624d\u80fd\u5728\u5f02\u5e38\u589e\u957f\u65f6\u53ca\u65f6\u4ecb\u5165\u3002\u8fd8\u53ef\u4ee5\u76d1\u63a7 logrotate \u7684\u6267\u884c\u65e5\u5fd7 \/var\/lib\/logrotate\/status\uff0c\u786e\u8ba4 cron \u6bcf\u5929\u90fd\u5728\u8dd1\uff0c\u914d\u7f6e\u53d8\u66f4\u540e\u8fd9\u4e2a\u6587\u4ef6\u5e94\u8be5\u80fd\u770b\u5230\u6700\u8fd1\u4e00\u6b21\u6267\u884c\u65f6\u95f4\u3002<\/p>\n<p>\u76d1\u63a7\u65f6\u8981\u6ce8\u610f\u533a\u5206\u4e0d\u540c\u5206\u533a\u7684\u7a7a\u95f4\u4f7f\u7528\u3002\u6839\u5206\u533a \/ \u6ee1\u4e86\u4f1a\u5bfc\u81f4\u7cfb\u7edf\u65e0\u6cd5\u542f\u52a8\uff0c\/var \u5206\u533a\u6ee1\u4e86\u4f1a\u5f71\u54cd\u65e5\u5fd7\u548c\u6570\u636e\u5e93\u5199\u5165\uff0c\/tmp \u5206\u533a\u6ee1\u4e86\u4f1a\u5f71\u54cd\u4e34\u65f6\u6587\u4ef6\u3002\u5982\u679c\u65e5\u5fd7\u5199\u5728\u72ec\u7acb\u5206\u533a\uff08\u5982 \/var \u5355\u72ec\u6302\u8f7d\uff09\uff0c\u78c1\u76d8\u6ee1\u53ea\u5f71\u54cd\u8be5\u5206\u533a\u5185\u7684\u670d\u52a1\uff0c\u4e0d\u4e00\u5b9a\u4f1a\u8ba9\u6574\u4e2a\u7cfb\u7edf\u5d29\u6e83\uff0c\u4f46\u5f71\u54cd\u8303\u56f4\u8981\u660e\u786e\u8bb0\u5f55\u3002\u5efa\u8bae\u7528 df -h \u5b9a\u671f\u68c0\u67e5\u6240\u6709\u5206\u533a\u7684\u4f7f\u7528\u7387\uff0c\u5bf9\u65e5\u5fd7\u6240\u5728\u5206\u533a\u5355\u72ec\u8bbe\u7f6e\u66f4\u9ad8\u7684\u76d1\u63a7\u9891\u7387\u3002\u540c\u65f6\u8bbe\u7f6e inode \u4f7f\u7528\u7387\u76d1\u63a7\uff0c\u907f\u514d\u5927\u91cf\u5c0f\u6587\u4ef6\u8017\u5c3d inode \u5bfc\u81f4\u5373\u4f7f\u78c1\u76d8\u6709\u7a7a\u95f4\u4e5f\u65e0\u6cd5\u5199\u6587\u4ef6\u3002<\/p>\n<h2>\u603b\u7ed3<\/h2>\n<p>logrotate \u914d\u7f6e\u7684\u6838\u5fc3\u662f\u6309\u65e5\u5fd7\u589e\u957f\u91cf\u8bbe\u5b9a\u8f6e\u8f6c\u9891\u7387\u548c\u4fdd\u7559\u6570\u91cf\uff0c\u914d\u5408\u76d1\u63a7\u7cfb\u7edf\u7a7a\u95f4\u4f7f\u7528\u7387\u3002\u914d\u7f6e\u5b8c\u6210\u540e\u7528 -d \u6d4b\u8bd5\uff0c\u5f3a\u5236\u6267\u884c\u540e\u68c0\u67e5\u5f52\u6863\u6587\u4ef6\u3002postrotate \u811a\u672c\u8981\u786e\u4fdd\u670d\u52a1\u91cd\u65b0\u6253\u5f00\u65e5\u5fd7\u6587\u4ef6\uff0c\u5426\u5219\u65b0\u65e5\u5fd7\u4f1a\u5199\u5165\u5df2\u8f6e\u8f6c\u7684\u6587\u4ef6\u540d\u3002\u5b9a\u671f\u68c0\u67e5 logrotate \u6267\u884c\u65e5\u5fd7\u786e\u8ba4 cron \u6b63\u5e38\u5de5\u4f5c\u3002\u5bf9\u4e8e Hostease \u8fd9\u7c7b [VPS](https:\/\/cn.hostease.com\/vps\/) \u73af\u5883\uff0c\u5efa\u8bae\u6bcf\u6708\u68c0\u67e5\u4e00\u6b21\u78c1\u76d8\u4f7f\u7528\u7387\u548c\u65e5\u5fd7\u589e\u957f\u8d8b\u52bf\uff0c\u53ca\u65f6\u8c03\u6574\u8f6e\u8f6c\u7b56\u7565\u907f\u514d\u78c1\u76d8\u586b\u6ee1\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7528 logrotate \u914d\u7f6e Linux \u7cfb\u7edf\u65e5\u5fd7\u8f6e\u8f6c\uff0c\u907f\u514d\u7cfb\u7edf\u65e5\u5fd7\u586b\u6ee1\u6839\u5206\u533a\u5bfc\u81f4\u670d\u52a1\u5668\u5f02\u5e38\u3002<\/p>\n","protected":false},"author":2,"featured_media":32605,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3822],"tags":[4820,4557,4823,4822,4821],"class_list":["post-32608","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-guides","tag-logrotate","tag-4557","tag-4823","tag-4822","tag-4821"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/cn.hostease.com\/blog\/wp-content\/uploads\/2026\/08\/logrotate-linux-system-log-cover.webp","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/cn.hostease.com\/blog\/wp-json\/wp\/v2\/posts\/32608","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cn.hostease.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cn.hostease.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cn.hostease.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/cn.hostease.com\/blog\/wp-json\/wp\/v2\/comments?post=32608"}],"version-history":[{"count":1,"href":"https:\/\/cn.hostease.com\/blog\/wp-json\/wp\/v2\/posts\/32608\/revisions"}],"predecessor-version":[{"id":32609,"href":"https:\/\/cn.hostease.com\/blog\/wp-json\/wp\/v2\/posts\/32608\/revisions\/32609"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cn.hostease.com\/blog\/wp-json\/wp\/v2\/media\/32605"}],"wp:attachment":[{"href":"https:\/\/cn.hostease.com\/blog\/wp-json\/wp\/v2\/media?parent=32608"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cn.hostease.com\/blog\/wp-json\/wp\/v2\/categories?post=32608"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cn.hostease.com\/blog\/wp-json\/wp\/v2\/tags?post=32608"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}