{"id":68635,"date":"2026-01-30T11:25:01","date_gmt":"2026-01-30T03:25:01","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/68635.html"},"modified":"2026-01-30T11:25:01","modified_gmt":"2026-01-30T03:25:01","slug":"%e6%9c%8d%e5%8a%a1%e5%99%a8%e4%b8%8a%e7%ba%bf%e5%89%8d%e5%bf%85%e5%81%9a%e6%b8%85%e5%8d%95%ef%bc%9a2c4g-ecs-%e9%83%a8%e7%bd%b2%e5%ae%9e%e6%88%98%e6%8c%87%e5%8d%97","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/68635.html","title":{"rendered":"\u670d\u52a1\u5668\u4e0a\u7ebf\u524d\u5fc5\u505a\u6e05\u5355\uff1a2C4G ECS \u90e8\u7f72\u5b9e\u6218\u6307\u5357"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260130032500-697c248cac4d4.png\" alt=\"\" \/><\/p>\n<p>  <font color=\"orange\" size=\"3\"><b>\u7f51\u7f57\u5f00\u53d1<\/b><\/font><br \/>\n  <font color=\"wirte\" size=\"2\"><b>&#xff08;\u5c0f\u7ea2\u4e66\u3001\u5feb\u624b\u3001\u89c6\u9891\u53f7\u540c\u540d&#xff09;<\/b><\/font> <\/p>\n<p>\u2003\u2003\u5927\u5bb6\u597d&#xff0c;\u6211\u662f <font face=\"\u4eff\u5b8b\" color=\"orange\" size=\"5\">\u5c55\u83f2<\/font>&#xff0c;\u76ee\u524d\u5728\u4e0a\u5e02\u4f01\u4e1a\u4ece\u4e8b\u4eba\u5de5\u667a\u80fd\u9879\u76ee\u7814\u53d1\u7ba1\u7406\u5de5\u4f5c&#xff0c;\u5e73\u65f6\u70ed\u8877\u4e8e\u5206\u4eab\u5404\u79cd\u7f16\u7a0b\u9886\u57df\u7684\u8f6f\u786c\u6280\u80fd\u77e5\u8bc6\u4ee5\u53ca\u524d\u6cbf\u6280\u672f&#xff0c;\u5305\u62ec<font face=\"courier New\" color=\"purple\" size=\"4\">iOS\u3001\u524d\u7aef\u3001Harmony OS\u3001Java\u3001Python<\/font>\u7b49\u65b9\u5411\u3002\u5728<font face=\"courier New\" color=\"purple\" size=\"4\">\u79fb\u52a8\u7aef\u5f00\u53d1\u3001\u9e3f\u8499\u5f00\u53d1\u3001\u7269\u8054\u7f51\u3001\u5d4c\u5165\u5f0f\u3001\u4e91\u539f\u751f\u3001\u5f00\u6e90<\/font>\u7b49\u9886\u57df\u6709\u6df1\u539a\u9020\u8be3\u3002<\/p>\n<p><font color=\"red\" size=\"2\"><b><font color=\"black\" size=\"2\"><b>\u56fe\u4e66\u4f5c\u8005&#xff1a;\u300aESP32-C3 \u7269\u8054\u7f51\u5de5\u7a0b\u5f00\u53d1\u5b9e\u6218\u300b <font color=\"red\" size=\"2\"><b><font color=\"black\" size=\"2\"><b>\u56fe\u4e66\u4f5c\u8005&#xff1a;\u300aSwiftUI \u5165\u95e8&#xff0c;\u8fdb\u9636\u4e0e\u5b9e\u6218\u300b <font color=\"red\" size=\"2\"><b><font color=\"black\" size=\"2\"><b>\u8d85\u7ea7\u4e2a\u4f53&#xff1a;COC\u4e0a\u6d77\u793e\u533a\u4e3b\u7406\u4eba <font color=\"red\" size=\"2\"><b><font color=\"black\" size=\"2\"><b>\u7279\u7ea6\u8bb2\u5e08&#xff1a;\u5927\u5b66\u8bb2\u5e08&#xff0c;\u8c37\u6b4c\u4e9a\u9a6c\u900a\u5206\u4eab\u5609\u5bbe <font color=\"red\" size=\"2\"><b><font color=\"black\" size=\"2\"><b>\u79d1\u6280\u535a\u4e3b&#xff1a;\u534e\u4e3aHDE\/HDG<\/b><\/font><\/b><\/font><\/b><\/font><\/b><\/font><\/b><\/font><\/b><\/font><\/b><\/font><\/b><\/font><\/b><\/font><\/b><\/font><\/p>\n<p>\u6211\u7684\u535a\u5ba2\u5185\u5bb9\u6db5\u76d6\u5e7f\u6cdb&#xff0c;\u4e3b\u8981\u5206\u4eab\u6280\u672f\u6559\u7a0b\u3001Bug\u89e3\u51b3\u65b9\u6848\u3001\u5f00\u53d1\u5de5\u5177\u4f7f\u7528\u3001\u524d\u6cbf\u79d1\u6280\u8d44\u8baf\u3001\u4ea7\u54c1\u8bc4\u6d4b\u4e0e\u4f7f\u7528\u4f53\u9a8c\u3002\u6211\u7279\u522b\u5173\u6ce8\u4e91\u670d\u52a1\u4ea7\u54c1\u8bc4\u6d4b\u3001AI \u4ea7\u54c1\u5bf9\u6bd4\u3001\u5f00\u53d1\u677f\u6027\u80fd\u6d4b\u8bd5\u4ee5\u53ca\u6280\u672f\u62a5\u544a&#xff0c;\u540c\u65f6\u4e5f\u4f1a\u63d0\u4f9b\u4ea7\u54c1\u4f18\u7f3a\u70b9\u5206\u6790\u3001\u6a2a\u5411\u5bf9\u6bd4&#xff0c;\u5e76\u5206\u4eab\u6280\u672f\u6c99\u9f99\u4e0e\u884c\u4e1a\u5927\u4f1a\u7684\u53c2\u4f1a\u4f53\u9a8c\u3002\u6211\u7684\u76ee\u6807\u662f\u4e3a\u8bfb\u8005\u63d0\u4f9b\u6709\u6df1\u5ea6\u3001\u6709\u5b9e\u7528\u4ef7\u503c\u7684\u6280\u672f\u6d1e\u5bdf\u4e0e\u5206\u6790\u3002<\/p>\n<p>\u5c55\u83f2&#xff1a;\u60a8\u7684\u524d\u6cbf\u6280\u672f\u9886\u822a\u5458 &#x1f44b; \u5927\u5bb6\u597d&#xff0c;\u6211\u662f\u5c55\u83f2&#xff01; &#x1f4f1; \u5168\u7f51\u641c\u7d22\u201c\u5c55\u83f2\u201d&#xff0c;\u5373\u53ef\u7eb5\u89c8\u6211\u5728\u5404\u5927\u5e73\u53f0\u7684\u77e5\u8bc6\u8db3\u8ff9\u3002 &#x1f4e3; \u516c\u4f17\u53f7\u201cSwift\u793e\u533a\u201d&#xff0c;\u6bcf\u5468\u5b9a\u65f6\u63a8\u9001\u5e72\u8d27\u6ee1\u6ee1\u7684\u6280\u672f\u957f\u6587&#xff0c;\u4ece\u65b0\u5174\u6846\u67b6\u7684\u5256\u6790\u5230\u8fd0\u7ef4\u5b9e\u6218\u7684\u590d\u76d8&#xff0c;\u52a9\u60a8\u6280\u672f\u8fdb\u9636\u4e4b\u8def\u7545\u901a\u65e0\u963b\u3002 &#x1f4ac; \u5fae\u4fe1\u7aef\u6dfb\u52a0\u597d\u53cb\u201cfzhanfei\u201d&#xff0c;\u4e0e\u6211\u76f4\u63a5\u4ea4\u6d41&#xff0c;\u4e0d\u7ba1\u662f\u9879\u76ee\u74f6\u9888\u7684\u6c42\u52a9&#xff0c;\u8fd8\u662f\u884c\u4e1a\u8d8b\u52bf\u7684\u63a2\u8ba8&#xff0c;\u968f\u65f6\u7545\u6240\u6b32\u8a00\u3002 &#x1f4c5; \u6700\u65b0\u52a8\u6001&#xff1a;2025 \u5e74 3 \u6708 17 \u65e5 \u5feb\u6765\u52a0\u5165\u6280\u672f\u793e\u533a&#xff0c;\u4e00\u8d77\u6316\u6398\u6280\u672f\u7684\u65e0\u9650\u6f5c\u80fd&#xff0c;\u643a\u624b\u8fc8\u5411\u6570\u5b57\u5316\u65b0\u5f81\u7a0b&#xff01;<\/p>\n<\/p>\n<h4>\u6587\u7ae0\u76ee\u5f55<\/h4>\n<ul>\n<li>\n<ul>\n<li>\u524d\u8a00<\/li>\n<li>\u7cfb\u7edf\u4e0e\u5b89\u5168\u57fa\u7840\u914d\u7f6e<\/li>\n<li>\n<ul>\n<li>\u66f4\u65b0\u7cfb\u7edf\u548c\u57fa\u7840\u5de5\u5177<\/li>\n<li>\u521b\u5efa\u975e root \u7528\u6237<\/li>\n<li>\u914d\u7f6e\u9632\u706b\u5899\u548c\u5b89\u5168\u7ec4<\/li>\n<li>\u8bbe\u7f6e\u65f6\u533a<\/li>\n<\/ul>\n<\/li>\n<li>\u63a8\u8350\u90e8\u7f72\u67b6\u6784<\/li>\n<li>\n<ul>\n<li>\u63a8\u8350\u67b6\u6784<\/li>\n<li>\u4e0d\u63a8\u8350\u7684\u505a\u6cd5<\/li>\n<\/ul>\n<\/li>\n<li>\u7ec4\u4ef6\u9009\u62e9<\/li>\n<li>\u4e00\u952e\u81ea\u52a8\u5316\u90e8\u7f72\u65b9\u6848<\/li>\n<li>\n<ul>\n<li>\u4e3a\u4ec0\u4e48\u9009\u62e9 Docker Compose<\/li>\n<li>\u5b89\u88c5 Docker<\/li>\n<li>\u9879\u76ee\u76ee\u5f55\u7ed3\u6784<\/li>\n<li>Docker Compose \u914d\u7f6e\u793a\u4f8b<\/li>\n<li>\u4e00\u952e\u542f\u52a8<\/li>\n<\/ul>\n<\/li>\n<li>\u4e0a\u7ebf\u524d\u5fc5\u987b\u505a\u7684\u9690\u85cf\u4e8b\u9879<\/li>\n<li>\n<ul>\n<li>MySQL \u72ec\u7acb\u8d26\u53f7<\/li>\n<li>Python \u65e5\u5fd7\u5207\u5272<\/li>\n<li>HTTPS \u914d\u7f6e<\/li>\n<\/ul>\n<\/li>\n<li>\u603b\u7ed3<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>\u524d\u8a00<\/h3>\n<p>\u6700\u8fd1\u5e2e\u670b\u53cb\u90e8\u7f72\u4e00\u4e2a\u9879\u76ee\u5230\u963f\u91cc\u4e91 ECS&#xff0c;\u914d\u7f6e\u662f 2C4G &#043; 1Mbps \u5e26\u5bbd\u3002\u672c\u6765\u4ee5\u4e3a\u5f88\u7b80\u5355&#xff0c;\u7ed3\u679c\u8e29\u4e86\u4e0d\u5c11\u5751&#xff1a;\u9632\u706b\u5899\u6ca1\u914d\u7f6e\u597d\u88ab\u653b\u51fb\u3001MySQL \u7528 root \u7528\u6237\u5bfc\u81f4\u5b89\u5168\u95ee\u9898\u3001\u65e5\u5fd7\u6587\u4ef6\u628a\u78c1\u76d8\u5360\u6ee1\u4e86\u3001\u65f6\u533a\u4e0d\u5bf9\u5bfc\u81f4\u6570\u636e\u65f6\u95f4\u9519\u4e71\u7b49\u7b49\u3002<\/p>\n<p>\u8fd9\u4e9b\u95ee\u9898\u5176\u5b9e\u90fd\u662f\u53ef\u4ee5\u63d0\u524d\u907f\u514d\u7684&#xff0c;\u4f46\u5f88\u591a\u4eba\u5728\u4e0a\u7ebf\u524d\u5bb9\u6613\u5ffd\u7565\u8fd9\u4e9b\u7ec6\u8282\u3002\u4eca\u5929\u6211\u4eec\u5c31\u6765\u804a\u804a\u670d\u52a1\u5668\u4e0a\u7ebf\u524d\u5fc5\u987b\u505a\u7684\u90a3\u4e9b\u4e8b&#xff0c;\u7279\u522b\u662f\u5bf9\u4e8e 2C4G \u8fd9\u79cd\u914d\u7f6e\u7684\u670d\u52a1\u5668&#xff0c;\u6bcf\u4e00\u9879\u90fd\u5f88\u5173\u952e\u3002<\/p>\n<h3>\u7cfb\u7edf\u4e0e\u5b89\u5168\u57fa\u7840\u914d\u7f6e<\/h3>\n<p>\u4e0a\u7ebf\u524d\u7b2c\u4e00\u4ef6\u4e8b&#xff0c;\u5c31\u662f\u505a\u597d\u7cfb\u7edf\u7684\u57fa\u7840\u914d\u7f6e\u548c\u5b89\u5168\u8bbe\u7f6e\u3002\u8fd9\u4e9b\u914d\u7f6e\u867d\u7136\u770b\u8d77\u6765\u7b80\u5355&#xff0c;\u4f46\u5982\u679c\u4e0d\u505a&#xff0c;\u540e\u7eed\u4f1a\u5e26\u6765\u5f88\u591a\u9ebb\u70e6\u3002<\/p>\n<h4>\u66f4\u65b0\u7cfb\u7edf\u548c\u57fa\u7840\u5de5\u5177<\/h4>\n<p>\u9996\u5148&#xff0c;\u6211\u4eec\u9700\u8981\u66f4\u65b0\u7cfb\u7edf\u5230\u6700\u65b0\u7248\u672c&#xff0c;\u5e76\u5b89\u88c5\u4e00\u4e9b\u5e38\u7528\u7684\u57fa\u7840\u5de5\u5177\u3002\u867d\u7136\u8fd9\u4e00\u6b65\u770b\u8d77\u6765\u53ef\u6709\u53ef\u65e0&#xff0c;\u4f46\u5b9e\u9645\u4e0a\u5f88\u91cd\u8981\u3002\u7cfb\u7edf\u66f4\u65b0\u53ef\u4ee5\u4fee\u590d\u5df2\u77e5\u7684\u5b89\u5168\u6f0f\u6d1e&#xff0c;\u800c\u57fa\u7840\u5de5\u5177\u5728\u540e\u7eed\u90e8\u7f72\u548c\u7ef4\u62a4\u4e2d\u4f1a\u7ecf\u5e38\u7528\u5230\u3002<\/p>\n<p><span class=\"token function\">sudo<\/span> yum update -y<br \/>\n<span class=\"token function\">sudo<\/span> yum <span class=\"token function\">install<\/span> -y <span class=\"token function\">git<\/span> <span class=\"token function\">vim<\/span> <span class=\"token function\">wget<\/span> <span class=\"token function\">curl<\/span> <span class=\"token function\">unzip<\/span><\/p>\n<p>yum update -y \u4f1a\u66f4\u65b0\u6240\u6709\u7cfb\u7edf\u5305\u5230\u6700\u65b0\u7248\u672c&#xff0c;-y \u53c2\u6570\u8868\u793a\u81ea\u52a8\u786e\u8ba4&#xff0c;\u4e0d\u9700\u8981\u624b\u52a8\u8f93\u5165\u3002\u5b89\u88c5\u7684\u8fd9\u4e9b\u5de5\u5177\u4e2d&#xff0c;git \u7528\u4e8e\u4ee3\u7801\u62c9\u53d6&#xff0c;vim \u7528\u4e8e\u7f16\u8f91\u914d\u7f6e\u6587\u4ef6&#xff0c;wget \u548c curl \u7528\u4e8e\u4e0b\u8f7d\u6587\u4ef6&#xff0c;unzip \u7528\u4e8e\u89e3\u538b\u6587\u4ef6\u3002<\/p>\n<h4>\u521b\u5efa\u975e root \u7528\u6237<\/h4>\n<p>\u8fd9\u4e00\u6b65\u975e\u5e38\u91cd\u8981&#xff0c;\u4f46\u5f88\u591a\u4eba\u5bb9\u6613\u5ffd\u7565\u3002\u76f4\u63a5\u7528 root \u7528\u6237\u90e8\u7f72\u5e94\u7528\u662f\u975e\u5e38\u5371\u9669\u7684\u505a\u6cd5&#xff0c;\u4e00\u65e6\u5e94\u7528\u88ab\u653b\u51fb&#xff0c;\u653b\u51fb\u8005\u5c31\u83b7\u5f97\u4e86 root \u6743\u9650&#xff0c;\u53ef\u4ee5\u968f\u610f\u64cd\u4f5c\u670d\u52a1\u5668\u3002<\/p>\n<p>adduser deploy<br \/>\n<span class=\"token function\">passwd<\/span> deploy<br \/>\n<span class=\"token function\">usermod<\/span> -aG wheel deploy<\/p>\n<p>\u6211\u4eec\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a deploy \u7684\u7528\u6237&#xff0c;\u4e13\u95e8\u7528\u4e8e\u90e8\u7f72\u548c\u8fd0\u884c\u5e94\u7528\u3002usermod -aG wheel deploy \u5c06 deploy \u7528\u6237\u6dfb\u52a0\u5230 wheel \u7ec4&#xff0c;\u8fd9\u6837 deploy \u7528\u6237\u5c31\u53ef\u4ee5\u4f7f\u7528 sudo \u547d\u4ee4\u6765\u6267\u884c\u9700\u8981\u7ba1\u7406\u5458\u6743\u9650\u7684\u64cd\u4f5c\u3002<\/p>\n<p>\u540e\u7eed\u6240\u6709\u7684\u90e8\u7f72\u3001CI\/CD \u64cd\u4f5c\u90fd\u5e94\u8be5\u4f7f\u7528 deploy \u7528\u6237&#xff0c;\u800c\u4e0d\u662f root\u3002\u8fd9\u6837\u53ef\u4ee5\u5927\u5927\u964d\u4f4e\u5b89\u5168\u98ce\u9669\u3002<\/p>\n<h4>\u914d\u7f6e\u9632\u706b\u5899\u548c\u5b89\u5168\u7ec4<\/h4>\n<p>\u9632\u706b\u5899\u914d\u7f6e\u662f\u5b89\u5168\u7684\u7b2c\u4e00\u9053\u9632\u7ebf&#xff0c;\u4f46\u5f88\u591a\u4eba\u5bb9\u6613\u5ffd\u7565\u3002\u963f\u91cc\u4e91\u7684\u5b89\u5168\u7ec4\u548c\u670d\u52a1\u5668\u672c\u8eab\u7684\u9632\u706b\u5899\u90fd\u9700\u8981\u914d\u7f6e&#xff0c;\u8fd9\u662f\u53cc\u91cd\u4fdd\u9669\u3002<\/p>\n<p>\u963f\u91cc\u4e91\u5b89\u5168\u7ec4\u914d\u7f6e&#xff1a;<\/p>\n<p>\u5728\u963f\u91cc\u4e91\u63a7\u5236\u53f0&#xff0c;\u6211\u4eec\u9700\u8981\u914d\u7f6e\u5b89\u5168\u7ec4\u89c4\u5219&#xff0c;\u81f3\u5c11\u53ea\u653e\u884c\u5fc5\u8981\u7684\u7aef\u53e3&#xff1a;<\/p>\n<ul>\n<li>22&#xff08;SSH&#xff09;&#xff1a;\u7528\u4e8e\u8fdc\u7a0b\u767b\u5f55<\/li>\n<li>80&#xff08;HTTP&#xff09;&#xff1a;\u7528\u4e8e Web \u670d\u52a1<\/li>\n<li>443&#xff08;HTTPS&#xff09;&#xff1a;\u7528\u4e8e\u52a0\u5bc6\u7684 Web \u670d\u52a1<\/li>\n<\/ul>\n<p>\u7279\u522b\u8981\u6ce8\u610f\u7684\u662f&#xff0c;MySQL \u7684 3306 \u7aef\u53e3\u4e0d\u8981\u5bf9\u516c\u7f51\u5f00\u653e\u3002\u5982\u679c\u9700\u8981\u5728\u5916\u90e8\u8bbf\u95ee\u6570\u636e\u5e93&#xff0c;\u5e94\u8be5\u901a\u8fc7 SSH \u96a7\u9053\u6216\u8005 VPN \u7684\u65b9\u5f0f\u3002<\/p>\n<p>\u670d\u52a1\u5668\u9632\u706b\u5899\u914d\u7f6e&#xff1a;<\/p>\n<p>\u9664\u4e86\u5b89\u5168\u7ec4&#xff0c;\u6211\u4eec\u8fd8\u9700\u8981\u5728\u670d\u52a1\u5668\u4e0a\u914d\u7f6e\u9632\u706b\u5899&#xff1a;<\/p>\n<p><span class=\"token function\">sudo<\/span> systemctl <span class=\"token builtin class-name\">enable<\/span> firewalld<br \/>\n<span class=\"token function\">sudo<\/span> systemctl start firewalld<\/p>\n<p>firewall-cmd &#8211;permanent &#8211;add-service<span class=\"token operator\">&#061;<\/span>http<br \/>\nfirewall-cmd &#8211;permanent &#8211;add-service<span class=\"token operator\">&#061;<\/span>https<br \/>\nfirewall-cmd &#8211;reload<\/p>\n<p>systemctl enable firewalld \u8bbe\u7f6e\u9632\u706b\u5899\u5f00\u673a\u81ea\u542f&#xff0c;systemctl start firewalld \u542f\u52a8\u9632\u706b\u5899\u670d\u52a1\u3002\u7136\u540e\u6211\u4eec\u6dfb\u52a0 HTTP \u548c HTTPS \u670d\u52a1\u5230\u9632\u706b\u5899\u89c4\u5219\u4e2d&#xff0c;&#8211;permanent \u8868\u793a\u6c38\u4e45\u751f\u6548&#xff0c;firewall-cmd &#8211;reload \u91cd\u65b0\u52a0\u8f7d\u9632\u706b\u5899\u89c4\u5219\u4f7f\u914d\u7f6e\u751f\u6548\u3002<\/p>\n<h4>\u8bbe\u7f6e\u65f6\u533a<\/h4>\n<p>\u65f6\u533a\u8bbe\u7f6e\u770b\u8d77\u6765\u662f\u4e2a\u5c0f\u95ee\u9898&#xff0c;\u4f46\u5b9e\u9645\u4e0a\u5f88\u91cd\u8981\u3002\u5982\u679c\u65f6\u533a\u4e0d\u5bf9&#xff0c;\u65e5\u5fd7\u65f6\u95f4\u3001\u6570\u636e\u5e93\u65f6\u95f4\u3001\u5e94\u7528\u65f6\u95f4\u90fd\u4f1a\u9519\u4e71&#xff0c;\u6392\u67e5\u95ee\u9898\u65f6\u4f1a\u5f88\u9ebb\u70e6\u3002<\/p>\n<p>timedatectl set-timezone Asia\/Shanghai<\/p>\n<p>\u8bbe\u7f6e\u65f6\u533a\u4e3a\u4e0a\u6d77\u65f6\u533a&#xff08;\u4e1c\u516b\u533a&#xff09;&#xff0c;\u8fd9\u6837\u6240\u6709\u7684\u65f6\u95f4\u8bb0\u5f55\u90fd\u4f1a\u4f7f\u7528\u6b63\u786e\u7684\u65f6\u533a\u3002\u8fd9\u4e2a\u8bbe\u7f6e\u4f1a\u5f71\u54cd\u7cfb\u7edf\u65e5\u5fd7\u3001MySQL \u65f6\u95f4\u3001Python \u5e94\u7528\u65f6\u95f4\u7b49\u6240\u6709\u65f6\u95f4\u76f8\u5173\u7684\u529f\u80fd\u3002<\/p>\n<h3>\u63a8\u8350\u90e8\u7f72\u67b6\u6784<\/h3>\n<p>\u5bf9\u4e8e 2C4G \u7684\u670d\u52a1\u5668&#xff0c;\u6211\u4eec\u9700\u8981\u9009\u62e9\u4e00\u4e2a\u7701\u5185\u5b58\u3001\u7a33\u5b9a\u3001\u53ef\u81ea\u52a8\u5316\u7684\u90e8\u7f72\u67b6\u6784\u3002\u8d44\u6e90\u6709\u9650\u7684\u60c5\u51b5\u4e0b&#xff0c;\u67b6\u6784\u9009\u62e9\u5f88\u91cd\u8981\u3002<\/p>\n<h4>\u63a8\u8350\u67b6\u6784<\/h4>\n<p>\u5bf9\u4e8e\u8fd9\u79cd\u914d\u7f6e\u7684\u670d\u52a1\u5668&#xff0c;\u6211\u63a8\u8350\u4f7f\u7528\u4ee5\u4e0b\u67b6\u6784&#xff1a;<\/p>\n<p>Nginx<br \/>\n \u251c\u2500\u2500 React \u524d\u7aef&#xff08;build \u540e\u7684\u9759\u6001\u6587\u4ef6&#xff09;<br \/>\n \u2514\u2500\u2500 \/api \u2192 Python \u540e\u7aef&#xff08;Gunicorn \/ Uvicorn&#xff09;<br \/>\nMySQL&#xff08;\u672c\u673a or RDS&#xff09;<\/p>\n<p>\u8fd9\u4e2a\u67b6\u6784\u7684\u4f18\u52bf\u662f&#xff1a;<\/p>\n<ul>\n<li>\u8d44\u6e90\u5360\u7528\u4f4e&#xff1a;Nginx \u4f5c\u4e3a\u53cd\u5411\u4ee3\u7406&#xff0c;\u5185\u5b58\u5360\u7528\u5f88\u5c0f&#xff1b;\u524d\u7aef\u662f\u9759\u6001\u6587\u4ef6&#xff0c;\u4e0d\u9700\u8981\u8fd0\u884c\u65f6&#xff1b;\u540e\u7aef\u7528 Gunicorn \u6216 Uvicorn&#xff0c;\u53ef\u4ee5\u63a7\u5236\u8fdb\u7a0b\u6570<\/li>\n<li>\u90e8\u7f72\u7b80\u5355&#xff1a;\u524d\u7aef\u6253\u5305\u540e\u76f4\u63a5\u653e\u5230 Nginx&#xff0c;\u540e\u7aef\u7528\u8fdb\u7a0b\u7ba1\u7406\u5668\u8fd0\u884c<\/li>\n<li>\u6613\u4e8e\u6269\u5c55&#xff1a;\u540e\u7eed\u5982\u679c\u9700\u8981&#xff0c;\u53ef\u4ee5\u5f88\u5bb9\u6613\u5730\u5c06 MySQL \u8fc1\u79fb\u5230 RDS&#xff0c;\u6216\u8005\u5c06\u540e\u7aef\u6269\u5c55\u5230\u591a\u53f0\u670d\u52a1\u5668<\/li>\n<\/ul>\n<h4>\u4e0d\u63a8\u8350\u7684\u505a\u6cd5<\/h4>\n<p>\u5728\u8d44\u6e90\u6709\u9650\u7684\u60c5\u51b5\u4e0b&#xff0c;\u6709\u4e9b\u505a\u6cd5\u662f\u4e0d\u63a8\u8350\u7684&#xff1a;<\/p>\n<ul>\n<li>K8s&#xff1a;Kubernetes \u672c\u8eab\u5c31\u9700\u8981\u4e0d\u5c11\u8d44\u6e90&#xff0c;2C4G \u7684\u670d\u52a1\u5668\u8dd1 K8s \u4f1a\u5f88\u5403\u529b<\/li>\n<li>\u5fae\u670d\u52a1\u62c6\u5206&#xff1a;\u5fae\u670d\u52a1\u9700\u8981\u66f4\u591a\u7684\u8d44\u6e90\u6765\u8fd0\u884c\u591a\u4e2a\u670d\u52a1\u5b9e\u4f8b<\/li>\n<li>\u591a\u4e2a MySQL \u5b9e\u4f8b&#xff1a;\u4e00\u4e2a MySQL \u5b9e\u4f8b\u5df2\u7ecf\u4f1a\u5360\u7528\u4e0d\u5c11\u5185\u5b58&#xff0c;\u591a\u4e2a\u5b9e\u4f8b\u4f1a\u8ba9\u670d\u52a1\u5668\u8d44\u6e90\u7d27\u5f20<\/li>\n<li>\u524d\u7aef Node \u5e38\u9a7b\u8fd0\u884c&#xff1a;React \u5e94\u7528\u5e94\u8be5\u6253\u5305\u6210\u9759\u6001\u6587\u4ef6&#xff0c;\u800c\u4e0d\u662f\u7528 Node \u670d\u52a1\u5668\u8fd0\u884c<\/li>\n<\/ul>\n<h3>\u7ec4\u4ef6\u9009\u62e9<\/h3>\n<p>\u9009\u62e9\u5408\u9002\u7684\u7ec4\u4ef6\u5bf9\u4e8e\u8d44\u6e90\u6709\u9650\u7684\u670d\u52a1\u5668\u5f88\u91cd\u8981\u3002\u6211\u4eec\u9700\u8981\u9009\u62e9\u90a3\u4e9b\u8f7b\u91cf\u7ea7\u3001\u7a33\u5b9a\u3001\u6613\u7ef4\u62a4\u7684\u7ec4\u4ef6\u3002<\/p>\n<table>\n<tr>\u6a21\u5757\u65b9\u6848\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td>\u524d\u7aef<\/td>\n<td>React build \u2192 Nginx<\/td>\n<td>React \u5e94\u7528\u6253\u5305\u6210\u9759\u6001\u6587\u4ef6&#xff0c;\u7528 Nginx \u63d0\u4f9b\u9759\u6001\u6587\u4ef6\u670d\u52a1<\/td>\n<\/tr>\n<tr>\n<td>\u540e\u7aef<\/td>\n<td>FastAPI \/ Flask &#043; Gunicorn<\/td>\n<td>Python \u6846\u67b6\u914d\u5408 Gunicorn \u4f5c\u4e3a WSGI \u670d\u52a1\u5668<\/td>\n<\/tr>\n<tr>\n<td>Web Server<\/td>\n<td>Nginx<\/td>\n<td>\u4f5c\u4e3a\u53cd\u5411\u4ee3\u7406\u548c\u9759\u6001\u6587\u4ef6\u670d\u52a1\u5668<\/td>\n<\/tr>\n<tr>\n<td>\u6570\u636e\u5e93<\/td>\n<td>MySQL 8<\/td>\n<td>\u5efa\u8bae\u4f7f\u7528\u72ec\u7acb\u7528\u6237&#xff0c;\u4e0d\u8981\u7528 root<\/td>\n<\/tr>\n<tr>\n<td>HTTPS<\/td>\n<td>Certbot &#043; Let\u2019s Encrypt<\/td>\n<td>\u514d\u8d39 SSL \u8bc1\u4e66&#xff0c;\u81ea\u52a8\u7eed\u671f<\/td>\n<\/tr>\n<tr>\n<td>\u90e8\u7f72<\/td>\n<td>Docker Compose<\/td>\n<td>\u5bb9\u5668\u5316\u90e8\u7f72&#xff0c;\u6613\u4e8e\u7ba1\u7406\u548c\u56de\u6eda<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u8fd9\u4e2a\u7ec4\u5408\u7684\u4f18\u52bf\u662f\u8d44\u6e90\u5360\u7528\u4f4e\u3001\u7a33\u5b9a\u6027\u597d\u3001\u6613\u4e8e\u7ef4\u62a4\u3002\u7279\u522b\u662f Docker Compose&#xff0c;\u53ef\u4ee5\u8ba9\u6574\u4e2a\u90e8\u7f72\u8fc7\u7a0b\u53d8\u5f97\u975e\u5e38\u7b80\u5355\u3002<\/p>\n<h3>\u4e00\u952e\u81ea\u52a8\u5316\u90e8\u7f72\u65b9\u6848<\/h3>\n<p>\u5bf9\u4e8e 2C4G \u7684\u670d\u52a1\u5668&#xff0c;\u6211\u5f3a\u70c8\u63a8\u8350\u4f7f\u7528 Docker Compose \u8fdb\u884c\u4e00\u952e\u90e8\u7f72\u3002\u8fd9\u79cd\u65b9\u5f0f\u4e0d\u4ec5\u7b80\u5355&#xff0c;\u800c\u4e14\u6613\u4e8e\u56de\u6eda\u548c\u8fc1\u79fb\u3002<\/p>\n<h4>\u4e3a\u4ec0\u4e48\u9009\u62e9 Docker Compose<\/h4>\n<p>Docker Compose \u7684\u4f18\u52bf\u5728\u4e8e&#xff1a;<\/p>\n<ul>\n<li>\u8d44\u6e90\u5360\u7528\u53ef\u63a7&#xff1a;\u53ef\u4ee5\u9650\u5236\u6bcf\u4e2a\u5bb9\u5668\u7684\u8d44\u6e90\u4f7f\u7528<\/li>\n<li>\u6613\u4e8e\u56de\u6eda&#xff1a;\u53ea\u9700\u8981\u5207\u6362\u955c\u50cf\u7248\u672c\u5373\u53ef<\/li>\n<li>\u6613\u4e8e\u8fc1\u79fb&#xff1a;\u914d\u7f6e\u6587\u4ef6\u53ef\u4ee5\u8f7b\u677e\u8fc1\u79fb\u5230\u5176\u4ed6\u670d\u52a1\u5668<\/li>\n<li>CI\/CD \u53cb\u597d&#xff1a;\u53ef\u4ee5\u5f88\u5bb9\u6613\u5730\u96c6\u6210\u5230 CI\/CD \u6d41\u7a0b\u4e2d<\/li>\n<\/ul>\n<h4>\u5b89\u88c5 Docker<\/h4>\n<p>\u9996\u5148&#xff0c;\u6211\u4eec\u9700\u8981\u5728\u670d\u52a1\u5668\u4e0a\u5b89\u88c5 Docker&#xff1a;<\/p>\n<p><span class=\"token function\">curl<\/span> -fsSL https:\/\/get.docker.com <span class=\"token operator\">|<\/span> <span class=\"token function\">bash<\/span><br \/>\n<span class=\"token function\">sudo<\/span> systemctl <span class=\"token builtin class-name\">enable<\/span> <span class=\"token function\">docker<\/span><br \/>\n<span class=\"token function\">sudo<\/span> systemctl start <span class=\"token function\">docker<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">usermod<\/span> -aG <span class=\"token function\">docker<\/span> deploy<\/p>\n<p>curl -fsSL https:\/\/get.docker.com | bash \u4f7f\u7528\u5b98\u65b9\u811a\u672c\u5b89\u88c5 Docker&#xff0c;systemctl enable docker \u8bbe\u7f6e Docker \u5f00\u673a\u81ea\u542f&#xff0c;systemctl start docker \u542f\u52a8 Docker \u670d\u52a1&#xff0c;usermod -aG docker deploy \u5c06 deploy \u7528\u6237\u6dfb\u52a0\u5230 docker \u7ec4&#xff0c;\u8fd9\u6837 deploy \u7528\u6237\u5c31\u53ef\u4ee5\u4e0d\u4f7f\u7528 sudo \u6765\u8fd0\u884c Docker \u547d\u4ee4\u3002<\/p>\n<h4>\u9879\u76ee\u76ee\u5f55\u7ed3\u6784<\/h4>\n<p>\u63a8\u8350\u7684\u9879\u76ee\u76ee\u5f55\u7ed3\u6784\u5982\u4e0b&#xff1a;<\/p>\n<p>app\/<br \/>\n\u251c\u2500\u2500 docker-compose.yml<br \/>\n\u251c\u2500\u2500 nginx\/<br \/>\n\u2502   \u2514\u2500\u2500 default.conf<br \/>\n\u251c\u2500\u2500 backend\/<br \/>\n\u2502   \u251c\u2500\u2500 Dockerfile<br \/>\n\u2502   \u2514\u2500\u2500 main.py<br \/>\n\u251c\u2500\u2500 frontend\/<br \/>\n\u2502   \u251c\u2500\u2500 Dockerfile<br \/>\n\u2502   \u2514\u2500\u2500 build\/<br \/>\n\u2514\u2500\u2500 mysql\/<\/p>\n<p>\u8fd9\u4e2a\u7ed3\u6784\u6e05\u6670\u660e\u4e86&#xff0c;\u6bcf\u4e2a\u7ec4\u4ef6\u90fd\u6709\u81ea\u5df1\u7684\u76ee\u5f55&#xff0c;\u914d\u7f6e\u6587\u4ef6\u4e5f\u5206\u5f00\u7ba1\u7406\u3002<\/p>\n<h4>Docker Compose \u914d\u7f6e\u793a\u4f8b<\/h4>\n<p>\u4e0b\u9762\u662f\u4e00\u4e2a\u7cbe\u7b80\u7248\u7684 docker-compose.yml \u914d\u7f6e&#xff1a;<\/p>\n<p><span class=\"token key atrule\">version<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;3.9&#034;<\/span><\/p>\n<p><span class=\"token key atrule\">services<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">nginx<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">image<\/span><span class=\"token punctuation\">:<\/span> nginx<span class=\"token punctuation\">:<\/span>stable<br \/>\n    <span class=\"token key atrule\">ports<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> <span class=\"token string\">&#034;80:80&#034;<\/span><br \/>\n    <span class=\"token key atrule\">volumes<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> .\/nginx<span class=\"token punctuation\">:<\/span>\/etc\/nginx\/conf.d<br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> .\/frontend\/build<span class=\"token punctuation\">:<\/span>\/usr\/share\/nginx\/html<br \/>\n    <span class=\"token key atrule\">depends_on<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> backend<\/p>\n<p>  <span class=\"token key atrule\">backend<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">build<\/span><span class=\"token punctuation\">:<\/span> .\/backend<br \/>\n    <span class=\"token key atrule\">command<\/span><span class=\"token punctuation\">:<\/span> gunicorn main<span class=\"token punctuation\">:<\/span>app <span class=\"token punctuation\">&#8211;<\/span>w 2 <span class=\"token punctuation\">&#8211;<\/span>b 0.0.0.0<span class=\"token punctuation\">:<\/span><span class=\"token number\">8000<\/span><br \/>\n    <span class=\"token key atrule\">environment<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> DB_HOST&#061;mysql<br \/>\n    <span class=\"token key atrule\">depends_on<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> mysql<\/p>\n<p>  <span class=\"token key atrule\">mysql<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">image<\/span><span class=\"token punctuation\">:<\/span> mysql<span class=\"token punctuation\">:<\/span><span class=\"token number\">8<\/span><br \/>\n    <span class=\"token key atrule\">environment<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token key atrule\">MYSQL_ROOT_PASSWORD<\/span><span class=\"token punctuation\">:<\/span> rootpwd<br \/>\n      <span class=\"token key atrule\">MYSQL_DATABASE<\/span><span class=\"token punctuation\">:<\/span> appdb<br \/>\n    <span class=\"token key atrule\">volumes<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> .\/mysql<span class=\"token punctuation\">:<\/span>\/var\/lib\/mysql<\/p>\n<p>\u8fd9\u4e2a\u914d\u7f6e\u5b9a\u4e49\u4e86\u4e09\u4e2a\u670d\u52a1&#xff1a;<\/p>\n<ul>\n<li>nginx&#xff1a;\u4f7f\u7528\u5b98\u65b9 nginx \u955c\u50cf&#xff0c;\u6620\u5c04 80 \u7aef\u53e3&#xff0c;\u6302\u8f7d nginx \u914d\u7f6e\u76ee\u5f55\u548c\u524d\u7aef\u6784\u5efa\u76ee\u5f55<\/li>\n<li>backend&#xff1a;\u4ece .\/backend \u76ee\u5f55\u6784\u5efa&#xff0c;\u4f7f\u7528 Gunicorn \u8fd0\u884c&#xff0c;\u8bbe\u7f6e 2 \u4e2a worker \u8fdb\u7a0b<\/li>\n<li>mysql&#xff1a;\u4f7f\u7528 MySQL 8 \u955c\u50cf&#xff0c;\u8bbe\u7f6e root \u5bc6\u7801\u548c\u6570\u636e\u5e93\u540d&#xff0c;\u6302\u8f7d\u6570\u636e\u76ee\u5f55<\/li>\n<\/ul>\n<h4>\u4e00\u952e\u542f\u52a8<\/h4>\n<p>\u914d\u7f6e\u597d\u4e4b\u540e&#xff0c;\u53ea\u9700\u8981\u4e00\u6761\u547d\u4ee4\u5c31\u53ef\u4ee5\u542f\u52a8\u6574\u4e2a\u5e94\u7528&#xff1a;<\/p>\n<p><span class=\"token function\">docker<\/span> compose up -d &#8211;build<\/p>\n<p>-d \u53c2\u6570\u8868\u793a\u540e\u53f0\u8fd0\u884c&#xff0c;&#8211;build \u53c2\u6570\u8868\u793a\u6784\u5efa\u955c\u50cf\u3002\u8fd9\u6761\u547d\u4ee4\u4f1a\u542f\u52a8\u6240\u6709\u670d\u52a1&#xff0c;\u5305\u62ec\u524d\u7aef\u3001\u540e\u7aef\u548c\u6570\u636e\u5e93\u3002<\/p>\n<h3>\u4e0a\u7ebf\u524d\u5fc5\u987b\u505a\u7684\u9690\u85cf\u4e8b\u9879<\/h3>\n<p>\u9664\u4e86\u4e0a\u9762\u8fd9\u4e9b\u660e\u663e\u7684\u914d\u7f6e&#xff0c;\u8fd8\u6709\u4e00\u4e9b\u9690\u85cf\u4f46\u5f88\u5173\u952e\u7684\u4e8b\u9879&#xff0c;\u5982\u679c\u4e0d\u505a&#xff0c;\u540e\u7eed\u4f1a\u5e26\u6765\u5f88\u591a\u95ee\u9898\u3002<\/p>\n<h4>MySQL \u72ec\u7acb\u8d26\u53f7<\/h4>\n<p>\u5f88\u591a\u4eba\u5728\u90e8\u7f72\u65f6\u76f4\u63a5\u7528 root \u7528\u6237\u8fde\u63a5\u6570\u636e\u5e93&#xff0c;\u8fd9\u662f\u975e\u5e38\u5371\u9669\u7684\u505a\u6cd5\u3002\u6211\u4eec\u5e94\u8be5\u4e3a\u5e94\u7528\u521b\u5efa\u72ec\u7acb\u7684\u6570\u636e\u5e93\u7528\u6237&#xff1a;<\/p>\n<p><span class=\"token keyword\">CREATE<\/span> <span class=\"token keyword\">USER<\/span> <span class=\"token string\">&#039;app&#039;<\/span><span class=\"token variable\">&#064;&#039;%&#039;<\/span> IDENTIFIED <span class=\"token keyword\">BY<\/span> <span class=\"token string\">&#039;strong_password&#039;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">GRANT<\/span> <span class=\"token keyword\">ALL<\/span> <span class=\"token keyword\">ON<\/span> appdb<span class=\"token punctuation\">.<\/span><span class=\"token operator\">*<\/span> <span class=\"token keyword\">TO<\/span> <span class=\"token string\">&#039;app&#039;<\/span><span class=\"token variable\">&#064;&#039;%&#039;<\/span><span class=\"token punctuation\">;<\/span><br \/>\nFLUSH <span class=\"token keyword\">PRIVILEGES<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>\u8fd9\u6837\u5373\u4f7f\u5e94\u7528\u88ab\u653b\u51fb&#xff0c;\u653b\u51fb\u8005\u4e5f\u53ea\u80fd\u8bbf\u95ee\u5e94\u7528\u6570\u636e\u5e93&#xff0c;\u800c\u4e0d\u80fd\u8bbf\u95ee\u5176\u4ed6\u6570\u636e\u5e93\u6216\u6267\u884c\u7cfb\u7edf\u7ea7\u64cd\u4f5c\u3002<\/p>\n<h4>Python \u65e5\u5fd7\u5207\u5272<\/h4>\n<p>Python \u5e94\u7528\u7684\u65e5\u5fd7\u5982\u679c\u4e0d\u505a\u5207\u5272&#xff0c;\u5f88\u5feb\u5c31\u4f1a\u628a\u78c1\u76d8\u5360\u6ee1\u30022C4G \u7684\u670d\u52a1\u5668\u901a\u5e38\u53ea\u6709 20GB \u6216 40GB \u7684\u78c1\u76d8&#xff0c;\u65e5\u5fd7\u6587\u4ef6\u5f88\u5bb9\u6613\u5360\u6ee1\u3002<\/p>\n<p>\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528 logrotate \u6765\u914d\u7f6e\u65e5\u5fd7\u5207\u5272&#xff1a;<\/p>\n<p><span class=\"token function\">sudo<\/span> <span class=\"token function\">vim<\/span> \/etc\/logrotate.d\/python-app<\/p>\n<p>\u6dfb\u52a0\u4ee5\u4e0b\u914d\u7f6e&#xff1a;<\/p>\n<p>\/path\/to\/app\/logs\/*.log {<br \/>\n    daily<br \/>\n    rotate 7<br \/>\n    compress<br \/>\n    delaycompress<br \/>\n    missingok<br \/>\n    notifempty<br \/>\n    create 0644 deploy deploy<br \/>\n}<\/p>\n<p>\u8fd9\u4e2a\u914d\u7f6e\u8868\u793a\u6bcf\u5929\u8f6e\u8f6c\u65e5\u5fd7&#xff0c;\u4fdd\u7559 7 \u5929\u7684\u65e5\u5fd7&#xff0c;\u538b\u7f29\u65e7\u65e5\u5fd7&#xff0c;\u5982\u679c\u65e5\u5fd7\u6587\u4ef6\u4e0d\u5b58\u5728\u4e5f\u4e0d\u62a5\u9519\u3002<\/p>\n<h4>HTTPS \u914d\u7f6e<\/h4>\n<p>HTTPS \u4e0d\u662f\u53ef\u9009\u9879&#xff0c;\u800c\u662f\u5fc5\u987b\u9879\u3002\u73b0\u5728\u6d4f\u89c8\u5668\u5bf9 HTTP \u7f51\u7ad9\u4f1a\u6709\u5b89\u5168\u8b66\u544a&#xff0c;\u800c\u4e14\u5f88\u591a\u529f\u80fd&#xff08;\u5982\u5730\u7406\u4f4d\u7f6e API&#xff09;\u53ea\u80fd\u5728 HTTPS \u4e0b\u4f7f\u7528\u3002<\/p>\n<p>\u4f7f\u7528 Certbot \u53ef\u4ee5\u5f88\u5bb9\u6613\u5730\u914d\u7f6e HTTPS&#xff1a;<\/p>\n<p><span class=\"token function\">sudo<\/span> yum <span class=\"token function\">install<\/span> -y certbot python3-certbot-nginx<br \/>\n<span class=\"token function\">sudo<\/span> certbot &#8211;nginx<\/p>\n<p>Certbot \u4f1a\u81ea\u52a8\u914d\u7f6e Nginx \u7684 SSL \u8bc1\u4e66&#xff0c;\u5e76\u4e14\u4f1a\u81ea\u52a8\u7eed\u671f\u3002Let\u2019s Encrypt \u7684\u8bc1\u4e66\u662f\u514d\u8d39\u7684&#xff0c;\u6bcf 90 \u5929\u81ea\u52a8\u7eed\u671f\u4e00\u6b21\u3002<\/p>\n<h3>\u603b\u7ed3<\/h3>\n<p>\u670d\u52a1\u5668\u4e0a\u7ebf\u524d\u7684\u51c6\u5907\u5de5\u4f5c\u867d\u7136\u7e41\u7410&#xff0c;\u4f46\u975e\u5e38\u91cd\u8981\u3002\u7cfb\u7edf\u66f4\u65b0\u3001\u7528\u6237\u521b\u5efa\u3001\u9632\u706b\u5899\u914d\u7f6e\u3001\u65f6\u533a\u8bbe\u7f6e\u8fd9\u4e9b\u57fa\u7840\u914d\u7f6e&#xff0c;\u4ee5\u53ca MySQL \u72ec\u7acb\u8d26\u53f7\u3001\u65e5\u5fd7\u5207\u5272\u3001HTTPS \u914d\u7f6e\u8fd9\u4e9b\u9690\u85cf\u4e8b\u9879&#xff0c;\u90fd\u662f\u5fc5\u987b\u505a\u7684\u3002<\/p>\n<p>\u5bf9\u4e8e 2C4G \u8fd9\u79cd\u914d\u7f6e\u7684\u670d\u52a1\u5668&#xff0c;\u9009\u62e9\u5408\u9002\u7684\u67b6\u6784\u548c\u7ec4\u4ef6\u4e5f\u5f88\u91cd\u8981\u3002\u4f7f\u7528 Docker Compose \u53ef\u4ee5\u5927\u5927\u7b80\u5316\u90e8\u7f72\u6d41\u7a0b&#xff0c;\u800c\u4e14\u6613\u4e8e\u7ba1\u7406\u548c\u56de\u6eda\u3002<\/p>\n<p>\u505a\u597d\u8fd9\u4e9b\u51c6\u5907\u5de5\u4f5c&#xff0c;\u53ef\u4ee5\u907f\u514d\u5f88\u591a\u540e\u7eed\u7684\u95ee\u9898&#xff0c;\u8ba9\u670d\u52a1\u5668\u8fd0\u884c\u66f4\u52a0\u7a33\u5b9a\u53ef\u9760\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7f51\u7f57\u5f00\u53d1 &#xff08;\u5c0f\u7ea2\u4e66\u3001\u5feb\u624b\u3001\u89c6\u9891\u53f7\u540c\u540d&#xff09; \u5927\u5bb6\u597d&#xff0c;\u6211\u662f \u5c55\u83f2&#xff0c;\u76ee\u524d\u5728\u4e0a\u5e02\u4f01\u4e1a\u4ece\u4e8b\u4eba\u5de5\u667a\u80fd\u9879\u76ee\u7814\u53d1\u7ba1\u7406\u5de5\u4f5c&#xff0c;\u5e73\u65f6\u70ed\u8877\u4e8e\u5206\u4eab\u5404\u79cd\u7f16\u7a0b\u9886\u57df\u7684\u8f6f\u786c\u6280\u80fd\u77e5\u8bc6\u4ee5\u53ca\u524d\u6cbf\u6280\u672f&#xff0c;\u5305\u62eciOS\u3001\u524d\u7aef\u3001Harmony OS\u3001Java\u3001Python\u7b49\u65b9\u5411\u3002\u5728\u79fb\u52a8\u7aef\u5f00\u53d1\u3001\u9e3f\u8499\u5f00\u53d1\u3001\u7269\u8054\u7f51\u3001\u5d4c\u5165\u5f0f\u3001\u4e91\u539f\u751f\u3001\u5f00\u6e90\u7b49\u9886\u57df\u6709\u6df1\u539a\u9020\u8be3\u3002<br \/>\n\u56fe\u4e66\u4f5c\u8005&#xff1a;\u300aESP32-C3 \u7269\u8054\u7f51\u5de5\u7a0b\u5f00\u53d1\u5b9e\u6218\u300b \u56fe\u4e66\u4f5c\u8005&#xff1a;\u300aS<\/p>\n","protected":false},"author":2,"featured_media":68634,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[43,44],"topic":[],"class_list":["post-68635","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-43","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u670d\u52a1\u5668\u4e0a\u7ebf\u524d\u5fc5\u505a\u6e05\u5355\uff1a2C4G ECS \u90e8\u7f72\u5b9e\u6218\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/68635.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u670d\u52a1\u5668\u4e0a\u7ebf\u524d\u5fc5\u505a\u6e05\u5355\uff1a2C4G ECS \u90e8\u7f72\u5b9e\u6218\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u7f51\u7f57\u5f00\u53d1 &#xff08;\u5c0f\u7ea2\u4e66\u3001\u5feb\u624b\u3001\u89c6\u9891\u53f7\u540c\u540d&#xff09; \u5927\u5bb6\u597d&#xff0c;\u6211\u662f \u5c55\u83f2&#xff0c;\u76ee\u524d\u5728\u4e0a\u5e02\u4f01\u4e1a\u4ece\u4e8b\u4eba\u5de5\u667a\u80fd\u9879\u76ee\u7814\u53d1\u7ba1\u7406\u5de5\u4f5c&#xff0c;\u5e73\u65f6\u70ed\u8877\u4e8e\u5206\u4eab\u5404\u79cd\u7f16\u7a0b\u9886\u57df\u7684\u8f6f\u786c\u6280\u80fd\u77e5\u8bc6\u4ee5\u53ca\u524d\u6cbf\u6280\u672f&#xff0c;\u5305\u62eciOS\u3001\u524d\u7aef\u3001Harmony OS\u3001Java\u3001Python\u7b49\u65b9\u5411\u3002\u5728\u79fb\u52a8\u7aef\u5f00\u53d1\u3001\u9e3f\u8499\u5f00\u53d1\u3001\u7269\u8054\u7f51\u3001\u5d4c\u5165\u5f0f\u3001\u4e91\u539f\u751f\u3001\u5f00\u6e90\u7b49\u9886\u57df\u6709\u6df1\u539a\u9020\u8be3\u3002 \u56fe\u4e66\u4f5c\u8005&#xff1a;\u300aESP32-C3 \u7269\u8054\u7f51\u5de5\u7a0b\u5f00\u53d1\u5b9e\u6218\u300b \u56fe\u4e66\u4f5c\u8005&#xff1a;\u300aS\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/68635.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-01-30T03:25:01+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260130032500-697c248cac4d4.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/68635.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/68635.html\",\"name\":\"\u670d\u52a1\u5668\u4e0a\u7ebf\u524d\u5fc5\u505a\u6e05\u5355\uff1a2C4G ECS \u90e8\u7f72\u5b9e\u6218\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-01-30T03:25:01+00:00\",\"dateModified\":\"2026-01-30T03:25:01+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/68635.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/68635.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/68635.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u670d\u52a1\u5668\u4e0a\u7ebf\u524d\u5fc5\u505a\u6e05\u5355\uff1a2C4G ECS \u90e8\u7f72\u5b9e\u6218\u6307\u5357\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u670d\u52a1\u5668\u4e0a\u7ebf\u524d\u5fc5\u505a\u6e05\u5355\uff1a2C4G ECS \u90e8\u7f72\u5b9e\u6218\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/68635.html","og_locale":"zh_CN","og_type":"article","og_title":"\u670d\u52a1\u5668\u4e0a\u7ebf\u524d\u5fc5\u505a\u6e05\u5355\uff1a2C4G ECS \u90e8\u7f72\u5b9e\u6218\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u7f51\u7f57\u5f00\u53d1 &#xff08;\u5c0f\u7ea2\u4e66\u3001\u5feb\u624b\u3001\u89c6\u9891\u53f7\u540c\u540d&#xff09; \u5927\u5bb6\u597d&#xff0c;\u6211\u662f \u5c55\u83f2&#xff0c;\u76ee\u524d\u5728\u4e0a\u5e02\u4f01\u4e1a\u4ece\u4e8b\u4eba\u5de5\u667a\u80fd\u9879\u76ee\u7814\u53d1\u7ba1\u7406\u5de5\u4f5c&#xff0c;\u5e73\u65f6\u70ed\u8877\u4e8e\u5206\u4eab\u5404\u79cd\u7f16\u7a0b\u9886\u57df\u7684\u8f6f\u786c\u6280\u80fd\u77e5\u8bc6\u4ee5\u53ca\u524d\u6cbf\u6280\u672f&#xff0c;\u5305\u62eciOS\u3001\u524d\u7aef\u3001Harmony OS\u3001Java\u3001Python\u7b49\u65b9\u5411\u3002\u5728\u79fb\u52a8\u7aef\u5f00\u53d1\u3001\u9e3f\u8499\u5f00\u53d1\u3001\u7269\u8054\u7f51\u3001\u5d4c\u5165\u5f0f\u3001\u4e91\u539f\u751f\u3001\u5f00\u6e90\u7b49\u9886\u57df\u6709\u6df1\u539a\u9020\u8be3\u3002 \u56fe\u4e66\u4f5c\u8005&#xff1a;\u300aESP32-C3 \u7269\u8054\u7f51\u5de5\u7a0b\u5f00\u53d1\u5b9e\u6218\u300b \u56fe\u4e66\u4f5c\u8005&#xff1a;\u300aS","og_url":"https:\/\/www.wsisp.com\/helps\/68635.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-01-30T03:25:01+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260130032500-697c248cac4d4.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/68635.html","url":"https:\/\/www.wsisp.com\/helps\/68635.html","name":"\u670d\u52a1\u5668\u4e0a\u7ebf\u524d\u5fc5\u505a\u6e05\u5355\uff1a2C4G ECS \u90e8\u7f72\u5b9e\u6218\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-01-30T03:25:01+00:00","dateModified":"2026-01-30T03:25:01+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/68635.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/68635.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/68635.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u670d\u52a1\u5668\u4e0a\u7ebf\u524d\u5fc5\u505a\u6e05\u5355\uff1a2C4G ECS \u90e8\u7f72\u5b9e\u6218\u6307\u5357"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/68635","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=68635"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/68635\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/68634"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=68635"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=68635"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=68635"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=68635"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}