{"id":970,"date":"2024-11-16T20:21:12","date_gmt":"2024-11-16T12:21:12","guid":{"rendered":"http:\/\/www.huerpu.cc:7000\/?p=970"},"modified":"2024-11-26T14:37:57","modified_gmt":"2024-11-26T06:37:57","slug":"ubuntu24-04%e9%85%8d%e7%bd%ae%e5%ae%89%e8%a3%85%e5%8f%af%e8%a7%86%e5%8c%96terminal%e7%bb%88%e7%ab%af","status":"publish","type":"post","link":"http:\/\/www.huerpu.cc:7000\/?p=970","title":{"rendered":"Ubuntu24.04\u914d\u7f6e\u5b89\u88c5\u53ef\u89c6\u5316terminal\u7ec8\u7aef"},"content":{"rendered":"<h1>Ubuntu24.04\u914d\u7f6e\u5b89\u88c5\u53ef\u89c6\u5316terminal\u7ec8\u7aef<\/h1>\n<p>\u6700\u5f00\u59cb\u6211\u662f\u60f3\u641e\u4e00\u4e0b\u5fae\u670d\u52a1\uff0c\u4e09\u53f0Eureka\u5df2\u7ecf\u641e\u597d\u4e86\uff0c\u4f46\u662f\u914d\u7f6e\u6587\u4ef6\u603b\u662f\u8ba9\u4eba\u96be\u53d7\uff0c\u6211\u60f3\u641e\u4e00\u4e0b\u53ef\u4ee5\u65b9\u4fbf\u4fee\u6539\u914d\u7f6e\u6587\u4ef6\u7684\u4e1c\u4e1c\uff0c\u4e8e\u662f\u5c31\u60f3\u88c5\u4e00\u4e0bApollo\uff0c\u5b89\u88c5\u4e86\u4e00\u4e2a\u672c\u5730Mysql\u7248\u672c\u7684Apollo\u770b\u5230\u8fd9\u4e2a\u7248\u672c\u6709\u5404\u79cd\u9650\u5236\uff0c\u4e8e\u662f\u5c31\u627e\u5230\u4e86\u5206\u5e03\u5f0f\u90e8\u7f72Apollo\u7684\u6587\u6863\uff0c\u5f53\u6211\u60f3\u6309\u7167\u6587\u6863\u642d\u5efa\u4e00\u4e2a\u7684\u65f6\u5019\uff0c\u5b83\u63d0\u793a\u6211\u8981\u6709\u5f00\u53d1\u3001\u6d4b\u8bd5\u3001UAT\u3001\u751f\u4ea7\u7b49\u7684mysql\u6570\u636e\u5e93\uff0c\u4e8e\u662f\u6211\u5c31\u60f3\u5728PVE\u4e2d\u641e\u8fd9\u51e0\u53f0mysql\uff0c\u5728\u6211\u5b89\u88c5mysql\u7684\u65f6\u5019\uff0c\u7531\u4e8e\u8fdc\u7a0btoDesk\u64cd\u4f5c\uff0c\u90a3\u4e2a\u7f51\u901f\u592a\u5361\uff0c\u547d\u4ee4\u884c\u590d\u5236\u7684\u4e5f\u65ad\u65ad\u7eed\u7eed\u7684\uff0c\u800c\u6211\u7684\u4e2d\u5174WiFi\u7684\u6d41\u91cf\u88ab\u6211\u7528\u5149\u4e86\uff0c\u4e8e\u662f\u6211\u53bb\u8d2d\u4e70\u4e86\u6d41\u91cf\uff0c\u4f46\u5356\u5bb6\u662f\u4e2a\u9a97\u5b50\uff0c\u5f88\u591a\u4eba\u8bc4\u8bba\u8bf4\u4e0a\u5f53\u4e86\uff0c\u4e8e\u662f\u6211\u5c31\u7ec8\u6b62\u4e86\u64cd\u4f5c\u3002\u5176\u5b9e\u6211\u60f3\u8981\u8fde\u63a5\u5bb6\u91cc\u7684PVE\u865a\u62df\u673a\uff0c\u5e76\u4e14\u53bb\u5c40\u57df\u7f51\u8bbf\u95ee\u5404\u79cd\u865a\u62df\u673a\uff0c\u53ea\u8981\u4e00\u4e2a\u5360\u7528\u5e26\u5bbd\u5f88\u5c0f\u7684terminal\u5c31\u53ef\u4ee5\uff0c\u4e8e\u662f\u6211\u5c31\u627e\u5230\u4e86\u5404\u79cd\u53ef\u89c6\u5316terminal\u7ec8\u7aef\uff0c\u4e5f\u628a\u6bcf\u4e2a\u7ec8\u7aef\u90fd\u641e\u4e86\u4e00\u4e0b\uff0c\u5bf9\u6bd4\u4e00\u4e0b\u770b\u54ea\u4e2a\u597d\u7528\uff0c\u7ed3\u679c\u5361\u5728\u4e86\u7b2c\u4e94\u4e2awetty\u4e0a\uff0c\u7ed3\u679c\u4e00\u5929\u5c31\u8fd9\u4e48\u8fc7\u53bb\u4e86&#8230;\u56de\u8fc7\u5934\u6765\uff0c\u6211\u90fd\u5fd8\u8bb0\u4e86\u6211\u6700\u5f00\u59cb\u7684\u521d\u5fc3\uff0c\u53ea\u662f\u4e3a\u4e86\u641e\u4e00\u4e0bEureka\u3002\u8fd9\u4e2a\u51e0\u4e2a\u53ef\u89c6\u5316\u7ec8\u7aef\u6700\u63a8\u8350webmin\uff0c\u771f\u7684\u5f88\u597d\u7528\uff0c\u754c\u9762\u4e5f\u5f88\u597d\u770b\uff0c\u5f3a\u70c8\u63a8\u8350\u3002<\/p>\n<h2>\u4e00\u3001webmin<\/h2>\n<p>\u5916\u89c2\u6f02\u4eae\uff0c\u597d\u7528\uff0c\u5e76\u4e14\u6709CPU\u3001\u5185\u5b58\u3001\u786c\u76d8\u7b49\u76d1\u63a7\u4fe1\u606f\u3002<\/p>\n<pre><code class=\"language-shell\">curl -o webmin-setup-repos.sh https:\/\/raw.githubusercontent.com\/webmin\/webmin\/master\/webmin-setup-repos.sh\nsh webmin-setup-repos.sh\n\napt-get install webmin --install-recommends\n\nufw allow 10000\n#\u8bbf\u95eehttps:\/\/&lt;Your-Server-IP&gt;:10000<\/code><\/pre>\n<p>\u767b\u5f55\u754c\u9762\uff1a<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2024\/11\/16\/Screenshot-2024-11-16-184829.png\" alt=\"Screenshot 2024-11-16 184829\" \/><\/p>\n<p>\u76d1\u63a7\u4fe1\u606f\uff1a<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2024\/11\/16\/Screenshot-2024-11-16-170736.png\" alt=\"Screenshot 2024-11-16 170736\" \/><\/p>\n<p>\u547d\u4ee4\u884c\u64cd\u4f5c\u754c\u9762\uff1a<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2024\/11\/16\/Screenshot-2024-11-16-170943.png\" alt=\"Screenshot 2024-11-16 170943\" \/><\/p>\n<p>\u5f53\u7136\u4e5f\u652f\u6301\u9875\u9762\u7aef\u6587\u4ef6\u4e0a\u4f20\u4e0e\u4e0b\u8f7d\uff1a<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2024\/11\/16\/Screenshot-2024-11-16-185012.png\" alt=\"Screenshot 2024-11-16 185012\" \/><\/p>\n<h2>\u4e8c\u3001Cockpit<\/h2>\n<pre><code class=\"language-shell\">. \/etc\/os-release\nsudo apt install -t ${VERSION_CODENAME}-backports cockpit\n\nufw allow 9090\n#\u8bbf\u95eehttps:\/\/&lt;Your-Server-IP&gt;:9090<\/code><\/pre>\n<p>\u767b\u5f55\u754c\u9762\u662f\u8fd9\u4e2a\u6837\u5b50\u7684\uff1a<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2024\/11\/16\/Screenshot-2024-11-16-190620.png\" alt=\"Screenshot 2024-11-16 190620\" \/><\/p>\n<p>\u6982\u89c8\u662f\u8fd9\u4e2a\u6837\u5b50\u7684\uff0c\u4e5f\u6709\u786c\u4ef6\u4f7f\u7528\u60c5\u51b5\u7684\u4fe1\u606f<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2024\/11\/16\/Screenshot-2024-11-16-190703.png\" alt=\"Screenshot 2024-11-16 190703\" \/><\/p>\n<p>\u7ec8\u7aef\u662f\u8fd9\u4e2a\u6837\u5b50\u7684\uff0c\u603b\u4f53\u6765\u8bf4\u4e11\u4e86\u4e00\u4e9b\uff0c\u800c\u4e14\u6ca1\u6709\u6587\u4ef6\u64cd\u4f5c\u7684\u9009\u9879\u3002<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2024\/11\/16\/Screenshot-2024-11-16-190817.png\" alt=\"Screenshot 2024-11-16 190817\" \/><\/p>\n<h2>\u4e09\u3001shellinabox<\/h2>\n<pre><code class=\"language-shell\">apt-get install shellinabox #\u5b89\u88c5\nservice shellinabox start #\u8fd0\u884c\nservice shellinabox status #\u72b6\u6001\n\nufw allow 4200\n#\u8bbf\u95eehttps:\/\/IP:4200<\/code><\/pre>\n<p>\u8fd9\u4e2a\u5c31\u53ea\u6709\u4e00\u4e2a\u547d\u4ee4\u884c\u7684\u7ec8\u7aef\u663e\u793a\uff0c\u800c\u4e14\u662f\u767d\u8272\u7684\uff0c\u6709\u70b9\u4e11\uff0c\u547d\u4ee4\u884c\u53cd\u5e94\u5012\u662f\u633a\u5feb\u7684<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2024\/11\/16\/Screenshot-2024-11-16-191105.png\" alt=\"Screenshot 2024-11-16 191105\" \/><\/p>\n<h2>\u56db\u3001ttyd<\/h2>\n<pre><code class=\"language-shell\">apt-get update\napt-get install -y build-essential cmake git libjson-c-dev libwebsockets-dev\ngit clone https:\/\/github.com\/tsl0922\/ttyd.git\ncd ttyd &amp;&amp; mkdir build &amp;&amp; cd build\ncmake ..\nmake &amp;&amp; sudo make install\n[ 16%] Building C object CMakeFiles\/ttyd.dir\/src\/utils.c.o\n[ 33%] Building C object CMakeFiles\/ttyd.dir\/src\/pty.c.o\n[ 50%] Building C object CMakeFiles\/ttyd.dir\/src\/protocol.c.o\n[ 66%] Building C object CMakeFiles\/ttyd.dir\/src\/http.c.o\n[ 83%] Building C object CMakeFiles\/ttyd.dir\/src\/server.c.o\n[100%] Linking C executable ttyd\n[100%] Built target ttyd\n[100%] Built target ttyd\nInstall the project...\n-- Install configuration: &quot;&quot;\n-- Installing: \/usr\/local\/bin\/ttyd\n-- Installing: \/usr\/local\/share\/man\/man1\/ttyd.1\n\n#\u8fd0\u884cttyd\nttyd -p 7681 bash\n\n#\u540e\u53f0\u8fd0\u884c\nnohup ttyd -p 7681 bash &amp;\n\nnohup ttyd -p 7681 bash &gt; \/usr\/software\/ttyd.log 2&gt;&amp;1 &amp;\n\n#\u67e5\u770bttyd\nps -ef | grep ttyd\n\n#\u8bbf\u95eehttp:\/\/&lt;Your-Server-IP&gt;:7681<\/code><\/pre>\n<p>\u8fd9\u4e2a\u8f6f\u4ef6\u5728\u4f7f\u7528\u7684\u8fc7\u7a0b\u4e2dbug\u6709\u70b9\u591a\uff0c\u754c\u9762\u4e5f\u53ea\u6709\u4e00\u4e2a\u547d\u4ee4\u884c\u7a97\u53e3\uff0c\u603b\u4f53\u4e0d\u5efa\u8bae\u4f7f\u7528\u3002<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2024\/11\/16\/Screenshot-2024-11-16-191550.png\" alt=\"Screenshot 2024-11-16 191550\" \/><\/p>\n<h2>\u4e94\u3001Wetty<\/h2>\n<pre><code class=\"language-shell\"># \u5b89\u88c5 NodeSource PPA\ncurl -fsSL https:\/\/deb.nodesource.com\/setup_18.x | sudo -E bash -\n\n# \u5b89\u88c5 Node.js \u548c npm\nsudo apt-get install -y nodejs\n\nsudo npm install -g wetty\n\nufw allow 3000\n\nwetty -p 3000\n\n#\u8bbf\u95eehttp:\/\/&lt;Your-Server-IP&gt;:3000<\/code><\/pre>\n<p>\u8fd9\u4e2a\u8f6f\u4ef6\u5c31\u66f4\u8ba9\u4eba\u86cb\u75bc\u4e86\uff0c\u5361\u5728npm install -g wetty\u5c31\u4e0d\u52a8\u4e86\uff0c\u4e5f\u6ca1\u62a5\u9519\u4e5f\u6ca1\u6709\u8fdb\u5ea6\uff0c\u5c31\u662f\u86cb\u75bc\u7684\u73a9\u610f\u3002\u5c1d\u8bd5\u4e86\u5404\u79cd\u529e\u6cd5\u597d\u4e0d\u5bb9\u6613\u5b89\u88c5\u5b8c\u4e86\uff0c\u7ed9\u8fd4\u56de\u4e86\u4e00\u4e2aCannot GET \/\uff0c\u7b80\u76f4\u8981\u4e86\u547d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ubuntu24.04\u914d\u7f6e\u5b89\u88c5\u53ef\u89c6\u5316terminal\u7ec8\u7aef \u6700\u5f00\u59cb\u6211\u662f\u60f3\u641e\u4e00\u4e0b\u5fae\u670d\u52a1\uff0c\u4e09\u53f0Eureka\u5df2\u7ecf\u641e\u597d\u4e86 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30],"tags":[],"class_list":["post-970","post","type-post","status-publish","format-standard","hentry","category-ubuntu"],"_links":{"self":[{"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/posts\/970","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=970"}],"version-history":[{"count":8,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/posts\/970\/revisions"}],"predecessor-version":[{"id":1038,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/posts\/970\/revisions\/1038"}],"wp:attachment":[{"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=970"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=970"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=970"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}