{"id":2466,"date":"2022-11-29T14:45:37","date_gmt":"2022-11-29T06:45:37","guid":{"rendered":"https:\/\/199604.com\/?p=2466"},"modified":"2022-11-29T14:45:37","modified_gmt":"2022-11-29T06:45:37","slug":"centos8%ef%bc%9a%e7%99%bb%e5%bd%95ssh%e6%8f%90%e7%a4%baactivate-the-web-console","status":"publish","type":"post","link":"https:\/\/199604.com\/2466","title":{"rendered":"Centos8\uff1a\u767b\u5f55ssh\u63d0\u793aActivate the web console"},"content":{"rendered":"<h1>Centos8\uff1a\u767b\u5f55ssh\u63d0\u793aActivate the web console<\/h1>\n<p>\u6700\u8fd1\u5728\u73a9AnolisOS8.6\uff0c\u7136\u540e\u5b89\u88c5\u5b8c\u6bd5\u540e\uff0c\u901a\u8fc7ssh\u767b\u5f55\u7cfb\u7edf\u63d0\u793a<\/p>\n<p><code>Activate the web console with: systemctl enable --now cockpit.socket<\/code><\/p>\n<p>\u8fd9\u6761\u547d\u4ee4\u662f\u63d0\u793a\u53ef\u4ee5\u6fc0\u6d3b\u7cfb\u7edf\u7684Web\u7ba1\u7406\u7a0b\u5e8f\uff0c\u8bbe\u7f6e\u7cfb\u7edf\u5f00\u673a\u542f\u52a8\u3002<\/p>\n<blockquote><p>\n  cockpit web\u63a7\u5236\u53f0\u5728centos8\u73af\u5883\u5df2\u9ed8\u8ba4\u5b89\u88c5\uff0c\u4f46\u9ed8\u8ba4\u662f\u672a\u542f\u52a8\n<\/p><\/blockquote>\n<h2>\u4ec0\u4e48\u662fCockpit\uff1f<\/h2>\n<p>\u5b98\u65b9\u7f51\u7ad9\uff1ahttps:\/\/cockpit-project.org\/\u3002<\/p>\n<p>Cockpit\u662f\u7ea2\u5e3d\u5f00\u53d1\u7684\u7f51\u9875\u7248\u56fe\u50cf\u5316\u670d\u52a1\u7ba1\u7406\u5de5\u5177,\u4f18\u70b9\u662f\u65e0\u9700\u4e2d\u95f4\u5c42,\u4e14\u53ef\u4ee5\u7ba1\u7406\u591a\u79cd\u670d\u52a1<\/p>\n<p>Cockpit\u662f\u4e00\u4e2aWeb\u7aef\u7684\u7cfb\u7edf\u7ba1\u7406\u5de5\u5177\uff0c\u53ea\u7528\u9f20\u6807\u70b9\u70b9\u5c31\u80fd\u7ba1\u7406\u7cfb\u7edf\uff0c\u4e8b\u5b9e\u4e0a\u4e5f\u786e\u5b9e\u5982\u6b64\uff0c\u542f\u52a8Cockpit\u670d\u52a1\u4e4b\u540e\uff0c\u53ea\u9700\u8981\u9f20\u6807\u70b9\u70b9\u70b9\u5c31\u80fd\u5b8c\u6210\u7cfb\u7edf\u5f88\u591a\u57fa\u7840\u64cd\u4f5c\uff0c\u6bd4\u5982\u67e5\u770b\u7cfb\u7edf\u4fe1\u606f\uff0c\u542f\u52a8\/\u505c\u6b62\u670d\u52a1\uff0c\u65b0\u589e\u6216\u8005\u66f4\u6539\u8d26\u6237\uff0c\u7cfb\u7edf\u66f4\u65b0\uff0cWeb\u7ec8\u7aef\u53ca\u67e5\u770b\u7f51\u7edc\u6d41\u91cf\u7b49\u529f\u80fd\u3002<\/p>\n<p>\u5982\u679c\u7cfb\u7edf\u4e2d\u6ca1\u6709\u9ed8\u8ba4\u5b89\u88c5\uff0c\u6267\u884c\u4e0b\u9762\u547d\u4ee4\u5f88\u5bb9\u6613\u5b89\u88c5\uff0c\u5728CentOS\u4e2d\u5b89\u88c5\uff1a<\/p>\n<h3>\u5b89\u88c5cockpit<\/h3>\n<p><code>sudo yum install cockpit<\/code><\/p>\n<h3>\u8bbe\u7f6e\u5f00\u673a\u542f\u52a8<\/h3>\n<p><code>sudo systemctl enable --now cockpit.socket<\/code><\/p>\n<h3>\u8bbe\u7f6e\u9632\u706b\u5899<\/h3>\n<p><code>sudo firewall-cmd --permanent --zone=public --add-service=cockpit<\/code><\/p>\n<p><code>sudo firewall-cmd --reload<\/code><\/p>\n<blockquote><p>\n  \u5b89\u88c5\u6210\u529f\u540e\u5728\u6d4f\u89c8\u5668\u4e2d\u8f93\u5165\u5730\u5740\u8fdb\u884c\u8bbf\u95ee\uff1a<code>https:\/\/ip-address:9090<\/code>\u3002**\u4f7f\u7528\u7cfb\u7edf\u7528\u6237\u540d\u3001\u5bc6\u7801\u767b\u5f55\u3002\n<\/p><\/blockquote>\n<h3>\u7981\u7528\u6216\u6ce8\u9500\u670d\u52a1<\/h3>\n<p>\u5982\u679c\u53d1\u884c\u7248\u672c\u4e2d\u9ed8\u8ba4\u5b89\u88c5\uff0c\u60a8\u6709\u4e0d\u60f3\u4f7f\u7528cockpit\uff0c\u76f4\u63a5\u7981\u7528\u6216\u6ce8\u9500\u5373\u53ef\u3002<\/p>\n<h4>\u7981\u7528cockpit<\/h4>\n<p><code>systemctl disable cockpit.socket<\/code><\/p>\n<h4>\u6ce8\u9500cockpit<\/h4>\n<p><code>systemctl mask cockpit.socket<\/code><\/p>\n<h3>\u4fee\u6539\u9ed8\u8ba4\u7aef\u53e3<\/h3>\n<p><code>vim \/usr\/lib\/systemd\/system\/cockpit.socket<\/code><\/p>\n<h4>\u7136\u540e\u91cd\u542f<\/h4>\n<pre><code class=\"language-shell \">sudo systemctl daemon-reload\nsudo systemctl restart cockpit.socket\nsystemctl restart cockpit.service\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Centos8\uff1a\u767b\u5f55ssh\u63d0\u793aActivate the web console \u6700\u8fd1\u5728\u73a9AnolisOS8.6 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[443],"tags":[259],"class_list":["post-2466","post","type-post","status-publish","format-standard","hentry","category-centos","tag-centos"],"_links":{"self":[{"href":"https:\/\/199604.com\/wp-json\/wp\/v2\/posts\/2466","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/199604.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/199604.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/199604.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/199604.com\/wp-json\/wp\/v2\/comments?post=2466"}],"version-history":[{"count":1,"href":"https:\/\/199604.com\/wp-json\/wp\/v2\/posts\/2466\/revisions"}],"predecessor-version":[{"id":2467,"href":"https:\/\/199604.com\/wp-json\/wp\/v2\/posts\/2466\/revisions\/2467"}],"wp:attachment":[{"href":"https:\/\/199604.com\/wp-json\/wp\/v2\/media?parent=2466"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/199604.com\/wp-json\/wp\/v2\/categories?post=2466"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/199604.com\/wp-json\/wp\/v2\/tags?post=2466"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}