{"id":949,"date":"2024-11-13T12:07:24","date_gmt":"2024-11-13T04:07:24","guid":{"rendered":"http:\/\/www.huerpu.cc:7000\/?p=949"},"modified":"2024-11-13T16:52:42","modified_gmt":"2024-11-13T08:52:42","slug":"ubuntu22-04%e4%b8%8a%e6%89%8b%e6%8c%87%e5%8d%97%e6%9b%b4%e6%96%b0%e9%98%bf%e9%87%8c%e6%ba%90%e3%80%81%e5%ae%89%e8%a3%85ssh%e3%80%81%e5%ae%89%e8%a3%85chrome%e3%80%81%e8%ae%be%e7%bd%ae%e5%9b%ba","status":"publish","type":"post","link":"http:\/\/www.huerpu.cc:7000\/?p=949","title":{"rendered":"ubuntu22.04\u4e0a\u624b\u6307\u5357(\u66f4\u65b0\u963f\u91cc\u6e90\u3001\u5b89\u88c5ssh\u3001\u5b89\u88c5chrome\u3001\u8bbe\u7f6e\u56fa\u5b9aIP\u3001\u5b89\u88c5\u641c\u72d7\u8f93\u5165\u6cd5)"},"content":{"rendered":"<h1>ubuntu22.04\u4e0a\u624b\u6307\u5357(\u66f4\u65b0\u963f\u91cc\u6e90\u3001\u5b89\u88c5ssh\u3001\u5b89\u88c5chrome\u3001\u8bbe\u7f6e\u56fa\u5b9aIP\u3001\u5b89\u88c5\u641c\u72d7\u8f93\u5165\u6cd5)<\/h1>\n<h2>\u4e00\u3001\u66f4\u65b0\u5e76\u5b89\u88c5\u57fa\u7840\u8f6f\u4ef6<\/h2>\n<pre><code class=\"language-shell\">#\u5207\u6362root\u7528\u6237\nsudo su -\n\n#\u66f4\u65b0\napt update \n\n#\u5347\u7ea7\napt upgrade\n\n#install vim\napt install vim\n\n#install net-tools\napt install net-tools<\/code><\/pre>\n<h2>\u4e8c\u3001\u5b89\u88c5ssh\u5e76\u8bbe\u7f6e\u5f00\u673a\u81ea\u542f\u52a8<\/h2>\n<pre><code class=\"language-shell\">#install ssh\napt install openssh-server\napt install openssh-client\n\n#\u91cd\u542fssh\u670d\u52a1\nservice ssh restart\n\nvim \/root\/.bashrc\n#\u6587\u4ef6\u672b\u5c3e\u589e\u52a0\u4e00\u6761\u8bb0\u5f55service ssh start\nservice ssh start\n\n#\u5c06PermitRootLogin\u7684\u503c\u6539\u4e3ayes\uff0c\/\u641c\u7d22\u5373\u53ef\uff0c\u8d85\u7ea7\u7b80\u5355\nvim \/etc\/ssh\/sshd_config\nPermitRootLogin yes\n\n#\u653e\u5f0022\u7aef\u53e3\nufw allow 22<\/code><\/pre>\n<h2>\u4e09\u3001\u5b89\u88c5chrome\u6d4f\u89c8\u5668<\/h2>\n<p>chrome\u5b98\u7f51\u4e0b\u8f7dchrome\u7684deb\u5b89\u88c5\u5305<\/p>\n<pre><code class=\"language-shell\">#\u4f7f\u7528wget\u547d\u4ee4\u4e0b\u8f7d\u6700\u65b0\u7248chrome\nwget https:\/\/dl.google.com\/linux\/direct\/google-chrome-stable_current_amd64.deb\n\n#\u5b89\u88c5chrome\ndpkg -i google-chrome-stable_current_amd64.deb\n\n#\u4e5f\u53ef\u4ee5\u624b\u52a8\u4e0b\u8f7d\uff0c\u7136\u540e\u5207\u6362\u5230\u4e0b\u8f7d\u76ee\u5f55\ncd \/home\/jason\/Download\n\n#install chrome\ndpkg -i google-chrome-stable_current_am64.deb<\/code><\/pre>\n<h2>\u56db\u3001\u8bbe\u7f6eubuntu\u66f4\u65b0\u6e90\u4e3a\u963f\u91cc\u6e90<\/h2>\n<pre><code class=\"language-shell\">#\u66f4\u6362\u963f\u91cc\u6e90\nvim \/etc\/apt\/sources.list\n\n#\u6e05\u9664\u539f\u6709\u6587\u4ef6\u5185\u5bb9\n:%d\n\n#\u628a\u4e0b\u9762\u7684\u8d34\u8fc7\u53bb\ndeb http:\/\/mirrors.aliyun.com\/ubuntu\/ jammy main restricted universe multiverse\ndeb-src http:\/\/mirrors.aliyun.com\/ubuntu\/ jammy main restricted universe multiverse\ndeb http:\/\/mirrors.aliyun.com\/ubuntu\/ jammy-security main restricted universe multiverse\ndeb-src http:\/\/mirrors.aliyun.com\/ubuntu\/ jammy-security main restricted universe multiverse\ndeb http:\/\/mirrors.aliyun.com\/ubuntu\/ jammy-updates main restricted universe multiverse\ndeb-src http:\/\/mirrors.aliyun.com\/ubuntu\/ jammy-updates main restricted universe multiverse\ndeb http:\/\/mirrors.aliyun.com\/ubuntu\/ jammy-proposed main restricted universe multiverse\ndeb-src http:\/\/mirrors.aliyun.com\/ubuntu\/ jammy-proposed main restricted universe multiverse\ndeb http:\/\/mirrors.aliyun.com\/ubuntu\/ jammy-backports main restricted universe multiverse\ndeb-src http:\/\/mirrors.aliyun.com\/ubuntu\/ jammy-backports main restricted universe multiverse\n\n#\u66f4\u65b0\napt update \n\n#\u5347\u7ea7\napt upgrade\n<\/code><\/pre>\n<h2>\u4e94\u3001\u547d\u4ee4\u884c\u8bbe\u7f6e\u9759\u6001IP\u5730\u5740<\/h2>\n<pre><code class=\"language-shell\">#\u8fdb\u5165\u7f51\u7edc\u7ba1\u7406\u76ee\u5f55\ncd \/etc\/netplan\n\nroot@kelsen-ubuntu-desktop:\/etc\/netplan# ls\n01-network-manager-all.yaml\n\nvim 01-network-manager-all.yaml\n\nnetwork:\n  version: 2\n  renderer: NetworkManager\n  ethernets:\n    ens33:      #ens33\u53ef\u6839\u636e\u547d\u4ee4ifconfig -a \u663e\u793a\u7684\u7f51\u5361\u540d\n      dhcp4: false\n      addresses:\n        - 192.168.1.114\/24  # \u5c06\u6b64\u5904\u7684IP\u5730\u5740\u66ff\u6362\u4e3a\u4f60\u60f3\u8981\u8bbe\u7f6e\u7684\u9759\u6001IP\u5730\u5740\n      optional: true\n      routes:\n        - to: default\n          via: 192.168.31.1  # \u5c06\u6b64\u5904\u7684\u7f51\u5173\u5730\u5740\u66ff\u6362\u4e3a\u4f60\u5bb6\u5ead\u8def\u7531\u5668\u7684\u7f51\u5173\u5730\u5740\n      nameservers:\n        addresses: [192.168.31.1,8.8.8.8,8.8.4.4] #\u53ef\u6839\u636e\u9700\u8981\u4fee\u6539\u4e3a\u4f60\u5e38\u7528\u7684DNS\u670d\u52a1\u5668\u5730\u5740,192.168.31.1\u4e3a\u8def\u7531\u5668\u5730\u5740\u7531\u8def\u7531\u5668\u505a\u4e3aDNS\uff0c8.8.8.8,8.8.4.4\u4e3a\u516c\u7f51DNS\uff0c\u8fd9\u6837\u7cfb\u7edf\u4f1a\u9996\u5148\u5c1d\u8bd5\u4f7f\u7528\u8def\u7531\u5668\u7684 DNS \u670d\u52a1\u5668\u8fdb\u884c\u57df\u540d\u89e3\u6790\uff0c\u5982\u679c\u8def\u7531\u5668\u7684 DNS \u670d\u52a1\u5668\u65e0\u6cd5\u89e3\u6790\uff0c\u5219\u4f1a\u81ea\u52a8\u4f7f\u7528\u7b2c\u4e8c\u4e2a DNS \u670d\u52a1\u5668\u59828.8.8.8\u8fdb\u884c\u89e3\u6790\n\n# \u8bbe\u7f6e600\u7684\u6587\u4ef6\u6743\u9650\uff0c\u5426\u5219\u4f1a\u62a5\u9519Permissions for \/etc\/netplan\/01-network-manager-all.yaml are too open. Netplan configuration should NOT be accessible by others.\nchmod 600 \/etc\/netplan\/01-network-manager-all.yaml\n\n#\u5e94\u7528\nnetplan apply<\/code><\/pre>\n<h2>\u516d\u3001\u5b89\u88c5\u641c\u72d7\u8f93\u5165\u6cd5<\/h2>\n<pre><code class=\"language-shell\">#\u4e0b\u8f7d\u8f93\u5165\u6cd5\u7f51\u5740 http:\/\/pinyin.sogou.com\/linux\/\n\n#\u5b89\u88c5fcitx\u5e76\u8bbe\u7f6e\u5f00\u673a\u542f\u52a8\napt install fcitx fcitx-table-wbpy\ncp \/usr\/share\/applications\/fcitx.desktop \/etc\/xdg\/autostart\/\n\n#\u5378\u8f7dibus\napt purge ibus\n\n#\u5b89\u88c5\u641c\u72d7\u62fc\u97f3\ndpkg -i sogoupinyin_4.2.1.145_amd64.deb\n\n#\u5b89\u88c5\u8f93\u5165\u6cd5\u4f9d\u8d56\napt install libqt5qml5 libqt5quick5 libqt5quickwidgets5 qml-module-qtquick2  -y\napt install libgsettings-qt1 -y\n\n#\u91cd\u542f\u7535\u8111\nreboot\n\n#\u53f3\u4e0a\u89d2\u8f93\u5165\u6cd5\u56fe\u6807 -- confing -- + -- \u641c\u7d22sogou<\/code><\/pre>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2024\/11\/13\/Screenshot-2024-11-13-115857_.png\" alt=\"Screenshot 2024-11-13 115857_\u526f\u672c\" \/><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2024\/11\/13\/Screenshot-2024-11-13-115819_.png\" alt=\"Screenshot 2024-11-13 115819_\u526f\u672c\" \/><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2024\/11\/13\/Screenshot-2024-11-13-120033_.png\" alt=\"Screenshot 2024-11-13 120033_\u526f\u672c\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>ubuntu22.04\u4e0a\u624b\u6307\u5357(\u66f4\u65b0\u963f\u91cc\u6e90\u3001\u5b89\u88c5ssh\u3001\u5b89\u88c5chrome\u3001\u8bbe\u7f6e\u56fa\u5b9aIP\u3001\u5b89\u88c5\u641c\u72d7\u8f93\u5165\u6cd5) \u4e00\u3001 [&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-949","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\/949","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=949"}],"version-history":[{"count":2,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/posts\/949\/revisions"}],"predecessor-version":[{"id":955,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/posts\/949\/revisions\/955"}],"wp:attachment":[{"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=949"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=949"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=949"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}