{"id":655285,"date":"2025-11-03T10:05:59","date_gmt":"2025-11-03T02:05:59","guid":{"rendered":"http:\/\/puo.cn\/?p=655285"},"modified":"2025-11-04T11:00:24","modified_gmt":"2025-11-04T03:00:24","slug":"ubuntu-22-%e7%b3%bb%e7%bb%9f%e4%b8%8b%e5%8d%b8%e8%bd%bd-3x-ui","status":"publish","type":"post","link":"http:\/\/puo.cn\/?p=655285","title":{"rendered":"Ubuntu 22 \u7cfb\u7edf\u4e0b\u5378\u8f7d 3x-ui"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>\u597d\u7684\uff0c\u5728 Ubuntu 22 \u7cfb\u7edf\u4e0b\u5378\u8f7d 3x-ui\uff0c\u4e3b\u8981\u6709\u4e24\u79cd\u65b9\u6cd5\uff1a**\u5b98\u65b9\u811a\u672c\u5378\u8f7d\uff08\u63a8\u8350\uff09** \u548c **\u624b\u52a8\u5378\u8f7d**\u3002<\/p>\n<p>\u5b98\u65b9\u811a\u672c\u662f\u6700\u5b89\u5168\u3001\u6700\u5f7b\u5e95\u7684\u65b9\u6cd5\uff0c\u56e0\u4e3a\u5b83\u4f1a\u81ea\u52a8\u5904\u7406\u6240\u6709\u76f8\u5173\u7684\u6587\u4ef6\u548c\u670d\u52a1\u3002\u624b\u52a8\u5378\u8f7d\u9002\u7528\u4e8e\u811a\u672c\u5931\u6548\u6216\u4f60\u60f3\u66f4\u7cbe\u7ec6\u5730\u63a7\u5236\u5378\u8f7d\u8fc7\u7a0b\u7684\u60c5\u51b5\u3002<\/p>\n<p>&#8212;<\/p>\n<h3>### \u65b9\u6cd5\u4e00\uff1a\u4f7f\u7528\u5b98\u65b9\u5378\u8f7d\u811a\u672c\uff08\u6700\u63a8\u8350\uff09<\/h3>\n<p>\u8fd9\u662f\u6700\u7b80\u5355\u3001\u6700\u5e72\u51c0\u7684\u65b9\u6cd5\u30023x-ui \u7684\u5b89\u88c5\u811a\u672c\u672c\u8eab\u5c31\u96c6\u6210\u4e86\u5378\u8f7d\u529f\u80fd\u3002<\/p>\n<p>**\u6b65\u9aa4 1\uff1a\u4e0b\u8f7d\u5b89\u88c5\u811a\u672c**<\/p>\n<p>\u5982\u679c\u4f60\u672c\u5730\u6ca1\u6709\u5b89\u88c5\u811a\u672c\uff0c\u9700\u8981\u5148\u4e0b\u8f7d\u4e00\u4e2a\u3002\u6253\u5f00\u7ec8\u7aef\uff0c\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<p>&#8220;`bash<br \/>\nwget https:\/\/raw.githubusercontent.com\/MHSanaei\/3x-ui\/master\/install.sh<br \/>\n&#8220;`<\/p>\n<p>\u6216\u8005\u4f7f\u7528 `curl`\uff1a<\/p>\n<p>&#8220;`bash<br \/>\ncurl -o install.sh https:\/\/raw.githubusercontent.com\/MHSanaei\/3x-ui\/master\/install.sh<br \/>\n&#8220;`<\/p>\n<p>**\u6b65\u9aa4 2\uff1a\u8d4b\u4e88\u811a\u672c\u6267\u884c\u6743\u9650**<\/p>\n<p>&#8220;`bash<br \/>\nchmod +x install.sh<br \/>\n&#8220;`<\/p>\n<p>**\u6b65\u9aa4 3\uff1a\u6267\u884c\u5378\u8f7d\u547d\u4ee4**<\/p>\n<p>\u8fd0\u884c\u811a\u672c\uff0c\u5e76\u5e26\u4e0a `uninstall` \u53c2\u6570\uff1a<\/p>\n<p>&#8220;`bash<br \/>\nsudo bash install.sh uninstall<br \/>\n&#8220;`<\/p>\n<p>\u811a\u672c\u4f1a\u81ea\u52a8\u6267\u884c\u4ee5\u4e0b\u64cd\u4f5c\uff1a<br \/>\n* \u505c\u6b62\u5e76\u7981\u7528 3x-ui \u670d\u52a1\u3002<br \/>\n* \u5220\u9664 3x-ui \u7684 systemd \u670d\u52a1\u6587\u4ef6\u3002<br \/>\n* \u5220\u9664 3x-ui \u7684\u4e3b\u7a0b\u5e8f\u6587\u4ef6\u3001\u914d\u7f6e\u6587\u4ef6\u3001\u6570\u636e\u5e93\u6587\u4ef6\u548c\u65e5\u5fd7\u6587\u4ef6\u3002<br \/>\n* \u5220\u9664 Xray \u6838\u5fc3\u6587\u4ef6\u3002<\/p>\n<p>\u6267\u884c\u5b8c\u6bd5\u540e\uff0c3x-ui \u5c31\u88ab\u5b8c\u5168\u4ece\u4f60\u7684\u7cfb\u7edf\u4e2d\u79fb\u9664\u4e86\u3002<\/p>\n<p>&#8212;<\/p>\n<h3>### \u65b9\u6cd5\u4e8c\uff1a\u624b\u52a8\u5378\u8f7d\uff08\u5907\u7528\u65b9\u6848\uff09<\/h3>\n<p>\u5982\u679c\u5b98\u65b9\u811a\u672c\u56e0\u4e3a\u67d0\u4e9b\u539f\u56e0\u65e0\u6cd5\u4f7f\u7528\uff0c\u4f60\u53ef\u4ee5\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u624b\u52a8\u6e05\u7406\u3002**\u8bf7\u52a1\u5fc5\u5c0f\u5fc3\u64cd\u4f5c\uff0c\u7279\u522b\u662f `rm -rf` \u547d\u4ee4\u3002**<\/p>\n<p>**\u6b65\u9aa4 1\uff1a\u505c\u6b62\u5e76\u7981\u7528 3x-ui \u670d\u52a1**<\/p>\n<p>\u8fd9\u662f\u7b2c\u4e00\u6b65\uff0c\u4e5f\u662f\u6700\u91cd\u8981\u7684\u4e00\u6b65\uff0c\u786e\u4fdd\u670d\u52a1\u5df2\u505c\u6b62\uff0c\u6587\u4ef6\u4e0d\u4f1a\u88ab\u5360\u7528\u3002<\/p>\n<p>&#8220;`bash<br \/>\nsudo systemctl stop 3x-ui<br \/>\nsudo systemctl disable 3x-ui<br \/>\n&#8220;`<\/p>\n<p>**\u6b65\u9aa4 2\uff1a\u5220\u9664 systemd \u670d\u52a1\u6587\u4ef6**<\/p>\n<p>&#8220;`bash<br \/>\nsudo rm \/etc\/systemd\/system\/3x-ui.service<br \/>\n&#8220;`<\/p>\n<p>\u7136\u540e\uff0c\u91cd\u65b0\u52a0\u8f7d systemd \u5b88\u62a4\u8fdb\u7a0b\uff0c\u8ba9\u5b83\u5fd8\u8bb0\u8fd9\u4e2a\u670d\u52a1\uff1a<\/p>\n<p>&#8220;`bash<br \/>\nsudo systemctl daemon-reload<br \/>\nsudo systemctl reset-failed<br \/>\n&#8220;`<\/p>\n<p>**\u6b65\u9aa4 3\uff1a\u5220\u9664 3x-ui \u76f8\u5173\u7684\u6587\u4ef6\u548c\u76ee\u5f55**<\/p>\n<p>3x-ui \u7684\u6587\u4ef6\u901a\u5e38\u5206\u5e03\u5728\u4ee5\u4e0b\u51e0\u4e2a\u4f4d\u7f6e\uff0c\u8bf7\u9010\u4e00\u5220\u9664\uff1a<\/p>\n<p>* **\u4e3b\u7a0b\u5e8f\u76ee\u5f55**\uff1a<br \/>\n&#8220;`bash<br \/>\nsudo rm -rf \/usr\/local\/bin\/3x-ui<br \/>\n&#8220;`<br \/>\n* **\u914d\u7f6e\u76ee\u5f55**\uff08\u5305\u542b\u4f60\u7684\u9762\u677f\u8bbe\u7f6e\u3001\u5165\u7ad9\u914d\u7f6e\u7b49\uff09\uff1a<br \/>\n&#8220;`bash<br \/>\nsudo rm -rf \/etc\/3x-ui\/<br \/>\n&#8220;`<br \/>\n* **\u6570\u636e\u5e93\u76ee\u5f55**\uff08\u5b58\u50a8\u7528\u6237\u4fe1\u606f\uff09\uff1a<br \/>\n&#8220;`bash<br \/>\nsudo rm -rf \/var\/lib\/3x-ui\/<br \/>\n&#8220;`<br \/>\n* **\u65e5\u5fd7\u76ee\u5f55**\uff1a<br \/>\n&#8220;`bash<br \/>\nsudo rm -rf \/var\/log\/3x-ui\/<br \/>\n&#8220;`<br \/>\n* **Xray \u6838\u5fc3\u6587\u4ef6**\uff1a<br \/>\n**\u6ce8\u610f\uff1a** \u5982\u679c\u4f60\u7684\u670d\u52a1\u5668\u4e0a\u8fd8\u6709\u5176\u4ed6\u7a0b\u5e8f\u5728\u4f7f\u7528 Xray\uff0c\u8bf7\u8c28\u614e\u5220\u9664\u6b64\u6587\u4ef6\u3002<br \/>\n&#8220;`bash<br \/>\nsudo rm \/usr\/local\/bin\/xray<br \/>\n&#8220;`<\/p>\n<p>**\u6b65\u9aa4 4\uff1a\u6e05\u7406\u9632\u706b\u5899\u89c4\u5219\uff08\u53ef\u9009\uff09**<\/p>\n<p>3x-ui \u5728\u5b89\u88c5\u65f6\u53ef\u80fd\u4f1a\u81ea\u52a8\u914d\u7f6e\u9632\u706b\u5899\uff08\u5982 UFW\uff09\u5f00\u653e\u9762\u677f\u7aef\u53e3\uff08\u9ed8\u8ba4 2053\uff09\u548c\u4e00\u4e9b\u4ee3\u7406\u7aef\u53e3\u3002\u4f60\u9700\u8981\u68c0\u67e5\u5e76\u624b\u52a8\u5220\u9664\u8fd9\u4e9b\u89c4\u5219\u3002<\/p>\n<p>\u67e5\u770b UFW \u72b6\u6001\uff1a<br \/>\n&#8220;`bash<br \/>\nsudo ufw status<br \/>\n&#8220;`<\/p>\n<p>\u5982\u679c\u4f60\u770b\u5230\u4e86\u7c7b\u4f3c `2053` \u6216\u5176\u4ed6\u4f60\u4e3a 3x-ui \u5f00\u653e\u7684\u7aef\u53e3\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5220\u9664\uff1a<br \/>\n&#8220;`bash<br \/>\n# \u793a\u4f8b\uff1a\u5220\u9664 2053 \u7aef\u53e3\u7684\u89c4\u5219<br \/>\nsudo ufw delete allow 2053<br \/>\n# \u793a\u4f8b\uff1a\u5220\u9664\u5176\u4ed6\u7aef\u53e3\u7684\u89c4\u5219<br \/>\nsudo ufw delete allow [\u4f60\u7684\u7aef\u53e3\u53f7]<br \/>\n&#8220;`<\/p>\n<p>**\u6b65\u9aa4 5\uff1a\u6e05\u7406\u4f9d\u8d56\u9879\uff08\u53ef\u9009\uff09**<\/p>\n<p>3x-ui \u7684\u5b89\u88c5\u811a\u672c\u53ef\u80fd\u4f1a\u5b89\u88c5\u4e00\u4e9b\u57fa\u7840\u5de5\u5177\uff0c\u5982 `wget`, `curl`, `unzip` \u7b49\u3002\u8fd9\u4e9b\u5de5\u5177\u901a\u5e38\u662f\u7cfb\u7edf\u5e38\u7528\u7684\uff0c**\u4e0d\u5efa\u8bae\u5378\u8f7d**\uff0c\u4ee5\u514d\u5f71\u54cd\u5176\u4ed6\u7a0b\u5e8f\u3002\u624b\u52a8\u5378\u8f7d\u901a\u5e38\u4e0d\u9700\u8981\u5904\u7406\u4f9d\u8d56\u9879\u3002<\/p>\n<p>&#8212;<\/p>\n<p>### \u5982\u4f55\u9a8c\u8bc1\u5378\u8f7d\u662f\u5426\u6210\u529f\uff1f<\/p>\n<p>\u5b8c\u6210\u4e0a\u8ff0\u4efb\u4e00\u65b9\u6cd5\u7684\u5378\u8f7d\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u9a8c\u8bc1\uff1a<\/p>\n<p>1. **\u68c0\u67e5\u670d\u52a1\u72b6\u6001**\uff1a<br \/>\n&#8220;`bash<br \/>\nsystemctl status 3x-ui<br \/>\n&#8220;`<br \/>\n\u5982\u679c\u6210\u529f\u5378\u8f7d\uff0c\u7ec8\u7aef\u5e94\u8be5\u4f1a\u63d0\u793a `Unit 3x-ui.service could not be found.` \u6216 `Loaded: not-found (Reason: No such file or directory)`\u3002<\/p>\n<p>2. **\u68c0\u67e5\u6587\u4ef6\u662f\u5426\u5b58\u5728**\uff1a<br \/>\n&#8220;`bash<br \/>\nls \/etc\/3x-ui<br \/>\n&#8220;`<br \/>\n\u5e94\u8be5\u4f1a\u63d0\u793a `ls: cannot access &#8216;\/etc\/3x-ui&#8217;: No such file or directory`\u3002<\/p>\n<p>3. **\u8bbf\u95ee Web \u9762\u677f**\uff1a<br \/>\n\u5728\u6d4f\u89c8\u5668\u4e2d\u5c1d\u8bd5\u8bbf\u95ee\u4f60\u4e4b\u524d\u7684 3x-ui \u9762\u677f\u5730\u5740\uff08\u4f8b\u5982 `http:\/\/\u4f60\u7684\u670d\u52a1\u5668IP:2053`\uff09\uff0c\u5e94\u8be5\u65e0\u6cd5\u8fde\u63a5\u4e86\u3002<\/p>\n<p>### \u603b\u7ed3<\/p>\n<p>| \u65b9\u6cd5 | \u4f18\u70b9 | \u7f3a\u70b9 | \u63a8\u8350\u5ea6 |<br \/>\n| :&#8212; | :&#8212; | :&#8212; | :&#8212; |<br \/>\n| **\u5b98\u65b9\u811a\u672c** | **\u7b80\u5355\u3001\u5b89\u5168\u3001\u5f7b\u5e95**\uff0c\u4e00\u952e\u5b8c\u6210 | \u9700\u8981\u80fd\u8bbf\u95ee GitHub \u4e0b\u8f7d\u811a\u672c | \u2b50\u2b50\u2b50\u2b50\u2b50 **\uff08\u9996\u9009\uff09** |<br \/>\n| **\u624b\u52a8\u5378\u8f7d** | **\u7075\u6d3b**\uff0c\u80fd\u4e86\u89e3\u5185\u90e8\u6587\u4ef6\u7ed3\u6784 | **\u6b65\u9aa4\u7e41\u7410\uff0c\u6613\u51fa\u9519**\uff0c\u6709\u8bef\u5220\u98ce\u9669 | \u2b50\u2b50\u2606\u2606\u2606 \uff08\u5907\u7528\u65b9\u6848\uff09 |<\/p>\n<p>\u5bf9\u4e8e\u7edd\u5927\u591a\u6570\u7528\u6237\uff0c**\u5f3a\u70c8\u5efa\u8bae\u4f7f\u7528\u65b9\u6cd5\u4e00\uff08\u5b98\u65b9\u811a\u672c\uff09**\u3002\u5b83\u662f\u6700\u53ef\u9760\u548c\u6700\u9ad8\u6548\u7684\u9009\u62e9<\/p>\n<p>&nbsp;<\/p>\n<h3>\u65b9\u6cd5\u4e09\uff1a\u5378\u8f7d3x-ui \u6216\u8005\u5378\u8f7d\u540e\u91cd\u65b0\u5b89\u88c5<\/h3>\n<p>\u5378\u8f7d\u94fe\u63a5<\/p>\n<p><a rel=\"nofollow\" href=\"https:\/\/flowus.cn\/xpp9\/share\/c630c451-2c6c-4a3f-82cd-de462fbe8ef9?code=FUAWSB\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/flowus.cn\/xpp9\/share\/c630c451-2c6c-4a3f-82cd-de462fbe8ef9?code=FUAWSB<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; \u597d\u7684\uff0c\u5728 Ubuntu 22 \u7cfb\u7edf\u4e0b\u5378\u8f7d 3x-ui\uff0c\u4e3b\u8981\u6709\u4e24\u79cd\u65b9\u6cd5\uff1a**\u5b98\u65b9\u811a\u672c\u5378\u8f7d\uff08\u63a8\u8350\uff09** \u548c **\u624b\u52a8\u5378\u8f7d**\u3002 \u5b98\u65b9\u811a\u672c\u662f\u6700\u5b89\u5168\u3001\u6700\u5f7b\u5e95\u7684\u65b9\u6cd5\uff0c\u56e0\u4e3a\u5b83\u4f1a\u81ea\u52a8\u5904\u7406\u6240\u6709\u76f8\u5173\u7684\u6587\u4ef6\u548c\u670d\u52a1\u3002\u624b\u52a8\u5378\u8f7d\u9002\u7528\u4e8e\u811a\u672c\u5931\u6548\u6216\u4f60\u60f3\u66f4\u7cbe&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[136,128],"tags":[889,888,515],"topic":[],"class_list":["post-655285","post","type-post","status-publish","format-standard","hentry","category-136","category-128","tag-x","tag-888","tag-515"],"_links":{"self":[{"href":"http:\/\/puo.cn\/index.php?rest_route=\/wp\/v2\/posts\/655285","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/puo.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/puo.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/puo.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/puo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=655285"}],"version-history":[{"count":4,"href":"http:\/\/puo.cn\/index.php?rest_route=\/wp\/v2\/posts\/655285\/revisions"}],"predecessor-version":[{"id":655321,"href":"http:\/\/puo.cn\/index.php?rest_route=\/wp\/v2\/posts\/655285\/revisions\/655321"}],"wp:attachment":[{"href":"http:\/\/puo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=655285"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/puo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=655285"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/puo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=655285"},{"taxonomy":"topic","embeddable":true,"href":"http:\/\/puo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftopic&post=655285"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}