{"id":44973,"date":"2023-03-31T21:28:37","date_gmt":"2023-03-31T13:28:37","guid":{"rendered":"http:\/\/lrxjmw.cn\/?p=44973"},"modified":"2023-03-31T21:28:37","modified_gmt":"2023-03-31T13:28:37","slug":"debianubuntu-autoupdate","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/debianubuntu-autoupdate.html","title":{"rendered":"Debian\u53ca\u5176\u884d\u751f\u7248\u81ea\u52a8\u66f4\u65b0\u5b89\u5168\u7684\u89e3\u51b3\u529e\u6cd5\uff01"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u4e4b\u524d\u5df2\u7ecf\u8bf4\u8fc7\uff0c\u4e00\u4e9b\u6700\u4f18\u79c0\u7684\u7cfb\u7edf\u7ba1\u7406\u5458\u770b\u4e0a\u53bb\uff08\u6ce8\u610f\u8fd9\u91cc\u4f7f\u7528\u7684\u8bcd\u662f seem\uff08\u770b\u4e0a\u53bb\uff09\uff09\u603b\u662f\u5f88\u201c\u61d2\u201d\u7684\uff0c\u8fd9\u53e5\u8bdd\u6211\u518d\u540c\u610f\u4e0d\u8fc7\u4e86\u3002\u867d\u7136\u8fd9\u53e5\u8bdd\u542c\u8d77\u6765\u6709\u70b9\u8352\u8c2c\uff0c\u4f46\u6211\u6562\u6253\u8d4c\u5728\u5927\u591a\u6570\u60c5\u51b5\u4e0b\u5b83\u662f\u5bf9\u7684\uff0d\u4e0d\u662f\u56e0\u4e3a\u4ed6\u4eec\u4e0d\u53bb\u505a\u4ed6\u4eec\u539f\u672c\u5e94\u8be5\u505a\u7684\u4e8b\u60c5\uff0c\u800c\u662f\u56e0\u4e3a\u4ed6\u4eec\u5df2\u7ecf\u8ba9\u7cfb\u7edf\u81ea\u52a8\u53bb\u5b8c\u6210\u8fd9\u6837\u7684\u4e8b\u60c5\u4e86\u3002\u5bf9\u4e8e Linux \u7cfb\u7edf\u6765\u8bf4\uff0c\u4e00\u4e2a\u6700\u5173\u952e\u7684\u9700\u6c42\u662f\u4e3a\u76f8\u5e94\u7684 Linux \u7248\u672c\u4fdd\u6301\u66f4\u65b0\u6700\u65b0\u7684\u5b89\u5168\u8865\u4e01\u3002
\n<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\"\"<\/p>\n

\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c06\u8ba8\u8bba\u5982\u4f55\u5728 Debian \u548c Ubuntu \u7cfb\u7edf\u4e0a\u8fdb\u884c\u8bbe\u7f6e\uff0c\u4ece\u800c\u5b9e\u73b0\u81ea\u52a8\u5b89\u88c5\u6216\u66f4\u65b0\u91cd\u8981\u7684\u5b89\u88c5\u5305\u6216\u8865\u4e01\u3002<\/p>\n

\u4e0d\u5fc5\u591a\u8bf4\uff0c\u4e3a\u4e86\u6267\u884c\u8fd9\u7bc7\u6587\u7ae0\u4e2d\u6240\u8bb2\u5230\u7684\u4efb\u52a1\uff0c\u4f60\u9700\u8981\u6709\u8d85\u7ea7\u7528\u6237\u7279\u6743\u3002<\/p>\n

\u5728 Debian\/Ubuntu \u4e0a\u914d\u7f6e\u81ea\u52a8\u5b89\u5168\u66f4\u65b0<\/strong><\/div>\n

\u9996\u5148\uff0c\u5b89\u88c5\u4e0b\u9762\u8fd9\u4e9b\u5b89\u88c5\u5305\uff1a<\/p>\n

# aptitude update -y && aptitude install unattended-upgrades apt-listchanges -y<\/pre>\n

apt-listchanges<\/span> \u5c06\u4f1a\u901a\u77e5\u4f60\u5728\u5347\u7ea7\u8fc7\u7a0b\u4e2d\u53d1\u751f\u7684\u6539\u53d8\u3002\u63a5\u4e0b\u6765\uff0c\u7528\u4f60\u6700\u559c\u6b22\u7684\u6587\u672c\u7f16\u8f91\u5668\u6253\u5f00 \/etc\/apt\/apt.conf.d\/50unattended-upgrades<\/span>,\u7136\u540e\u5728 Unattended-Upgrade::Origins-Pattern<\/span>\u5757\u4e2d\u95f4\u52a0\u5165\u4e0b\u9762\u8fd9\u884c\u5185\u5bb9\uff1a<\/p>\n

# aptitude update -y && aptitude install unattended-upgrades apt-listchanges -y<\/pre>\n

\u6700\u540e\uff0c\u6267\u884c\u4e0b\u9762\u7684\u547d\u4ee4\u6765\u751f\u6210\u6240\u9700\u7684\u914d\u7f6e\u6587\u4ef6\uff08\/etc\/apt\/apt.conf.d\/20auto-upgrades<\/span>\uff09\uff0c\u4ece\u800c\u6fc0\u6d3b\u81ea\u52a8\u66f4\u65b0\uff1a<\/p>\n

# dpkg-reconfigure -plow unattended-upgrades<\/pre>\n

\u5f53\u63d0\u793a\u5b89\u88c5\u81ea\u52a8\u5347\u7ea7\u65f6\uff0c\u9009\u62e9 'Yes'\uff1a<\/p>\n

\"\u5728<\/p>\n

\u7136\u540e\u68c0\u67e5\u4e0b\u9762\u8fd9\u4e24\u884c\u662f\u5426\u5df2\u7ecf\u52a0\u5165\u5230\u6587\u4ef6\/etc\/apt\/apt.conf.d\/20auto-upgrades<\/span>\u4e2d\u4e86\uff1a<\/p>\n

APT::Periodic::Update-Package-Lists \"1\";\r\nAPT::Periodic::Unattended-Upgrade \"1\";\r\n<\/pre>\n

\u589e\u52a0\u4e0b\u9762\u8fd9\u884c\u5185\u5bb9\u4f7f\u901a\u77e5\u66f4\u52a0\u8be6\u7ec6\uff1a<\/p>\n

APT::Periodic::Verbose \"2\";<\/pre>\n

\u6700\u540e\uff0c\u68c0\u67e5\/etc\/apt\/listchanges.conf<\/span>\u6765\u786e\u4fdd\u901a\u77e5\u80fd\u88ab\u53d1\u9001\u7ed9 root \u7528\u6237\u3002<\/p>\n

\"Debian<\/p>\n

\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u8ba8\u8bba\u4e86\u5982\u4f55\u786e\u4fdd\u4f60\u7684\u7cfb\u7edf\u5b9a\u671f\u66f4\u65b0\u6700\u65b0\u7684\u5b89\u5168\u8865\u4e01\u3002\u53e6\u5916\uff0c\u4f60\u4e5f\u5b66\u4e60\u4e86\u5982\u4f55\u8bbe\u7f6e\u63d0\u793a\uff0c\u4ece\u800c\u786e\u4fdd\u5e94\u7528\u4e86\u65b0\u7684\u8865\u4e01\u65f6\u4f60\u80fd\u591f\u88ab\u901a\u77e5\u5230\u3002<\/p>\n

\n

\u539f\u6587\u6765\u81ea\uff1ahttps:\/\/linux.cn\/article-8060-1.html<\/a><\/p>\n

\u672c\u6587\u5730\u5740\uff1a http:\/\/lrxjmw.cn\/debianubuntu-autoupdate.html \u200e<\/a>\u7f16\u8f91\uff1a\u674e\u5e05\uff0c\u5ba1\u6838\u5458\uff1a\u5cb3\u6c38<\/span><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"

\u5bfc\u8bfb \u4e4b\u524d\u5df2\u7ecf\u8bf4\u8fc7\uff0c\u4e00\u4e9b\u6700\u4f18\u79c0\u7684\u7cfb\u7edf\u7ba1\u7406\u5458\u770b\u4e0a\u53bb\uff08\u6ce8\u610f\u8fd9\u91cc\u4f7f\u7528\u7684\u8bcd\u662f seem\uff08\u770b\u4e0a\u53bb\uff09\uff09\u603b\u662f\u5f88\u201c\u61d2\u201d\u7684\uff0c\u8fd9\u53e5 […]<\/p>\n","protected":false},"author":63,"featured_media":44988,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-44973","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/44973","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\/63"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=44973"}],"version-history":[{"count":9,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/44973\/revisions"}],"predecessor-version":[{"id":268639,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/44973\/revisions\/268639"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/44988"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=44973"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=44973"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=44973"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}