{"id":45654,"date":"2024-10-07T00:55:14","date_gmt":"2024-10-06T16:55:14","guid":{"rendered":"https:\/\/server.hk\/cnblog\/45654\/"},"modified":"2024-11-14T10:36:19","modified_gmt":"2024-11-14T02:36:19","slug":"%e9%80%9a%e9%81%8e-cockpit-%e7%ae%a1%e7%90%86%e4%bd%a0%e7%9a%84%e6%a8%b9%e8%8e%93%e6%b4%be","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/45654\/","title":{"rendered":"\u901a\u904e Cockpit \u7ba1\u7406\u4f60\u7684\u6a39\u8393\u6d3e"},"content":{"rendered":"<h1 id=\"%e9%80%9a%e9%81%8e-cockpit-%e7%ae%a1%e7%90%86%e4%bd%a0%e7%9a%84%e6%a8%b9%e8%8e%93%e6%b4%be-OxUgHlOkFZ\">\u901a\u904e Cockpit \u7ba1\u7406\u4f60\u7684\u6a39\u8393\u6d3e<\/h1>\n<p>\u6a39\u8393\u6d3e\uff08Raspberry Pi\uff09\u662f\u4e00\u6b3e\u5ee3\u53d7\u6b61\u8fce\u7684\u55ae\u677f\u96fb\u8166\uff0c\u56e0\u5176\u4f4e\u6210\u672c\u548c\u9748\u6d3b\u6027\u800c\u53d7\u5230\u958b\u767c\u8005\u548c\u611b\u597d\u8005\u7684\u9752\u775e\u3002\u96a8\u8457\u6a39\u8393\u6d3e\u7684\u61c9\u7528\u8d8a\u4f86\u8d8a\u5ee3\u6cdb\uff0c\u5982\u4f55\u9ad8\u6548\u5730\u7ba1\u7406\u9019\u4e9b\u8a2d\u5099\u6210\u70ba\u4e86\u4e00\u500b\u91cd\u8981\u7684\u8ab2\u984c\u3002Cockpit \u662f\u4e00\u500b\u57fa\u65bc\u7db2\u9801\u7684\u4f3a\u670d\u5668\u7ba1\u7406\u5de5\u5177\uff0c\u80fd\u5920\u7c21\u5316\u6a39\u8393\u6d3e\u7684\u7ba1\u7406\u904e\u7a0b\u3002\u672c\u6587\u5c07\u4ecb\u7d39\u5982\u4f55\u901a\u904e Cockpit \u4f86\u7ba1\u7406\u4f60\u7684\u6a39\u8393\u6d3e\u3002<\/p>\n<h2 id=\"cockpit-%e6%98%af%e4%bb%80%e9%ba%bc%ef%bc%9f-OxUgHlOkFZ\">Cockpit \u662f\u4ec0\u9ebc\uff1f<\/h2>\n<p>Cockpit \u662f\u4e00\u500b\u958b\u6e90\u7684\u4f3a\u670d\u5668\u7ba1\u7406\u754c\u9762\uff0c\u65e8\u5728\u63d0\u4f9b\u4e00\u500b\u7c21\u55ae\u800c\u76f4\u89c0\u7684\u65b9\u5f0f\u4f86\u7ba1\u7406 Linux \u7cfb\u7d71\u3002\u5b83\u5141\u8a31\u7528\u6236\u901a\u904e\u7db2\u9801\u700f\u89bd\u5668\u9032\u884c\u7cfb\u7d71\u76e3\u63a7\u3001\u670d\u52d9\u7ba1\u7406\u3001\u65e5\u8a8c\u67e5\u770b\u7b49\u64cd\u4f5c\u3002Cockpit \u7684\u754c\u9762\u53cb\u597d\uff0c\u9069\u5408\u5404\u7a2e\u6280\u8853\u6c34\u5e73\u7684\u7528\u6236\uff0c\u7279\u5225\u662f\u5c0d\u65bc\u90a3\u4e9b\u4e0d\u719f\u6089\u547d\u4ee4\u884c\u7684\u4f7f\u7528\u8005\u3002<\/p>\n<h2 id=\"%e5%ae%89%e8%a3%9d-cockpit-OxUgHlOkFZ\">\u5b89\u88dd Cockpit<\/h2>\n<p>\u5728\u6a39\u8393\u6d3e\u4e0a\u5b89\u88dd Cockpit \u662f\u4e00\u500b\u76f8\u5c0d\u7c21\u55ae\u7684\u904e\u7a0b\u3002\u4ee5\u4e0b\u662f\u5b89\u88dd\u6b65\u9a5f\uff1a<\/p>\n<pre><code>sudo apt update\nsudo apt install cockpit\nsudo systemctl enable --now cockpit.socket\n<\/code><\/pre>\n<p>\u5b89\u88dd\u5b8c\u6210\u5f8c\uff0cCockpit \u6703\u81ea\u52d5\u555f\u52d5\u4e26\u5728 9090 \u7aef\u53e3\u4e0a\u904b\u884c\u3002\u4f60\u53ef\u4ee5\u901a\u904e\u700f\u89bd\u5668\u8a2a\u554f Cockpit \u7684\u754c\u9762\uff0c\u7db2\u5740\u70ba <code>http:\/\/:9090<\/code>\u3002<\/p>\n<h2 id=\"%e4%bd%bf%e7%94%a8-cockpit-%e9%80%b2%e8%a1%8c%e7%ae%a1%e7%90%86-OxUgHlOkFZ\">\u4f7f\u7528 Cockpit \u9032\u884c\u7ba1\u7406<\/h2>\n<p>\u4e00\u65e6\u9032\u5165 Cockpit \u7684\u754c\u9762\uff0c\u4f60\u5c07\u770b\u5230\u4e00\u500b\u6e05\u6670\u7684\u5100\u8868\u677f\uff0c\u986f\u793a\u7cfb\u7d71\u7684\u57fa\u672c\u4fe1\u606f\uff0c\u5305\u62ec CPU \u4f7f\u7528\u7387\u3001\u5167\u5b58\u4f7f\u7528\u60c5\u6cc1\u548c\u78c1\u789f\u7a7a\u9593\u7b49\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u4e3b\u8981\u529f\u80fd\uff1a<\/p>\n<ul>\n<li><strong>\u7cfb\u7d71\u76e3\u63a7\uff1a<\/strong>\u4f60\u53ef\u4ee5\u5be6\u6642\u67e5\u770b\u7cfb\u7d71\u6027\u80fd\u6307\u6a19\uff0c\u5e6b\u52a9\u4f60\u4e86\u89e3\u6a39\u8393\u6d3e\u7684\u904b\u884c\u72c0\u6cc1\u3002<\/li>\n<li><strong>\u670d\u52d9\u7ba1\u7406\uff1a<\/strong>Cockpit \u5141\u8a31\u4f60\u555f\u52d5\u3001\u505c\u6b62\u548c\u91cd\u555f\u7cfb\u7d71\u670d\u52d9\uff0c\u9019\u5c0d\u65bc\u7ba1\u7406\u4f3a\u670d\u5668\u61c9\u7528\u975e\u5e38\u65b9\u4fbf\u3002<\/li>\n<li><strong>\u65e5\u8a8c\u67e5\u770b\uff1a<\/strong>\u4f60\u53ef\u4ee5\u8f15\u9b06\u67e5\u770b\u7cfb\u7d71\u65e5\u8a8c\uff0c\u9019\u5c0d\u65bc\u6545\u969c\u6392\u67e5\u548c\u6027\u80fd\u512a\u5316\u81f3\u95dc\u91cd\u8981\u3002<\/li>\n<li><strong>\u7528\u6236\u7ba1\u7406\uff1a<\/strong>Cockpit \u63d0\u4f9b\u4e86\u7528\u6236\u7ba1\u7406\u529f\u80fd\uff0c\u8b93\u4f60\u53ef\u4ee5\u8f15\u9b06\u6dfb\u52a0\u6216\u522a\u9664\u7528\u6236\u3002<\/li>\n<\/ul>\n<h2 id=\"%e5%ae%89%e5%85%a8%e6%80%a7%e8%80%83%e9%87%8f-OxUgHlOkFZ\">\u5b89\u5168\u6027\u8003\u91cf<\/h2>\n<p>\u5728\u4f7f\u7528 Cockpit \u7ba1\u7406\u6a39\u8393\u6d3e\u6642\uff0c\u5b89\u5168\u6027\u662f\u5fc5\u9808\u8003\u616e\u7684\u56e0\u7d20\u3002\u5efa\u8b70\u4f60\u63a1\u53d6\u4ee5\u4e0b\u63aa\u65bd\u4f86\u589e\u5f37\u5b89\u5168\u6027\uff1a<\/p>\n<ul>\n<li>\u4f7f\u7528\u5f37\u5bc6\u78bc\uff1a\u78ba\u4fdd\u6240\u6709\u7528\u6236\u5e33\u6236\u90fd\u4f7f\u7528\u5f37\u5bc6\u78bc\uff0c\u4ee5\u9632\u6b62\u672a\u7d93\u6388\u6b0a\u7684\u8a2a\u554f\u3002<\/li>\n<li>\u555f\u7528\u9632\u706b\u7246\uff1a\u4f7f\u7528 <code>ufw<\/code> \u6216\u5176\u4ed6\u9632\u706b\u7246\u5de5\u5177\u4f86\u9650\u5236\u5c0d Cockpit \u7684\u8a2a\u554f\u3002<\/li>\n<li>\u5b9a\u671f\u66f4\u65b0\uff1a\u4fdd\u6301\u7cfb\u7d71\u548c Cockpit \u7684\u6700\u65b0\u7248\u672c\uff0c\u4ee5\u7372\u53d6\u6700\u65b0\u7684\u5b89\u5168\u4fee\u88dc\u3002<\/li>\n<\/ul>\n<h2 id=\"%e7%b5%90%e8%ab%96-OxUgHlOkFZ\">\u7d50\u8ad6<\/h2>\n<p>\u901a\u904e Cockpit\uff0c\u4f60\u53ef\u4ee5\u8f15\u9b06\u5730\u7ba1\u7406\u4f60\u7684\u6a39\u8393\u6d3e\uff0c\u7121\u8ad6\u662f\u76e3\u63a7\u7cfb\u7d71\u6027\u80fd\u9084\u662f\u7ba1\u7406\u670d\u52d9\u3002\u9019\u500b\u5de5\u5177\u4e0d\u50c5\u7c21\u5316\u4e86\u7ba1\u7406\u904e\u7a0b\uff0c\u9084\u63d0\u9ad8\u4e86\u64cd\u4f5c\u7684\u76f4\u89c0\u6027\u3002\u96a8\u8457\u6a39\u8393\u6d3e\u5728\u7269\u806f\u7db2\u548c\u5176\u4ed6\u61c9\u7528\u4e2d\u7684\u666e\u53ca\uff0c\u638c\u63e1\u9019\u7a2e\u7ba1\u7406\u5de5\u5177\u5c07\u5c0d\u958b\u767c\u8005\u548c\u611b\u597d\u8005\u5927\u6709\u88e8\u76ca\u3002<\/p>\n<p>\u5982\u679c\u4f60\u5c0d\u65bc\u4f3a\u670d\u5668\u7ba1\u7406\u6709\u66f4\u9ad8\u7684\u9700\u6c42\uff0c\u8003\u616e\u4f7f\u7528 <a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a> \u670d\u52d9\uff0c\u9019\u5c07\u70ba\u4f60\u7684\u9805\u76ee\u63d0\u4f9b\u66f4\u5f37\u5927\u7684\u652f\u6301\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f7f\u7528 Cockpit \u8f15\u9b06\u7ba1\u7406\u4f60\u7684\u6a39\u8393\u6d3e\uff0c\u5be6\u73fe\u7c21\u55ae\u7684\u7cfb\u7d71\u76e3\u63a7\u548c\u914d\u7f6e\uff0c\u63d0\u5347\u64cd\u4f5c\u6548\u7387\u8207\u4f7f\u7528\u9ad4\u9a57\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4924],"tags":[],"class_list":["post-45654","post","type-post","status-publish","format-standard","hentry","category-setup-tutorials"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/45654","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=45654"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/45654\/revisions"}],"predecessor-version":[{"id":45655,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/45654\/revisions\/45655"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=45654"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=45654"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=45654"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}