{"id":97558,"date":"2026-08-29T19:17:36","date_gmt":"2026-08-29T11:17:36","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/97558.html"},"modified":"2026-08-29T19:17:36","modified_gmt":"2026-08-29T11:17:36","slug":"%e6%88%91%e7%94%a8-2g-%e6%9c%8d%e5%8a%a1%e5%99%a8%e8%b7%91%e9%80%9a%e4%ba%86-opentenbase%ef%bc%81%e5%88%86%e5%b8%83%e5%bc%8f%e6%95%b0%e6%8d%ae%e5%ba%93-docker-%e5%8c%96%e9%83%a8%e7%bd%b2%e5%85%a8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/97558.html","title":{"rendered":"\u6211\u7528 2G \u670d\u52a1\u5668\u8dd1\u901a\u4e86 OpenTenBase\uff01\u5206\u5e03\u5f0f\u6570\u636e\u5e93 Docker \u5316\u90e8\u7f72\u5168\u8fc7\u7a0b"},"content":{"rendered":"<h3>\u524d\u8a00<\/h3>\n<p>\u8bf4\u5b9e\u8bdd&#xff0c;\u6211\u5dee\u70b9\u88ab OpenTenBase \u7684\u90e8\u7f72\u903c\u75af\u4e86\u3002<\/p>\n<p>\u4f5c\u4e3a\u4e00\u4e2a\u5b66\u751f&#xff0c;\u53ea\u6709\u4e00\u53f0 2G \u5185\u6838\u30011 \u6838 CPU \u7684\u817e\u8baf\u4e91\u670d\u52a1\u5668&#xff0c;\u60f3\u8981\u7814\u7a76\u56fd\u4ea7\u5206\u5e03\u5f0f\u6570\u636e\u5e93 OpenTenBase \u7684\u6e90\u7801\u548c\u67b6\u6784\u3002<\/p>\n<p>\u7ed3\u679c\u53d1\u73b0&#xff1a;<\/p>\n<p>\u5b98\u65b9\u90e8\u7f72\u6d41\u7a0b\u592a\u590d\u6742\u4e86&#xff01;<\/p>\n<p>\u9700\u8981&#xff1a;<\/p>\n<ul>\n<li>\u7f16\u8bd1 30-60 \u5206\u949f<\/li>\n<li>\u624b\u52a8\u914d\u7f6e 14 \u4e2a\u6b65\u9aa4<\/li>\n<li>\u5206\u522b\u521d\u59cb\u5316 GTM\u3001Coordinator\u3001Datanode<\/li>\n<li>\u624b\u52a8\u6ce8\u518c\u8282\u70b9\u5230 pgxc_node \u8868<\/li>\n<li>\u914d\u7f6e\u4e00\u5806\u7aef\u53e3\u548c\u53c2\u6570<\/li>\n<\/ul>\n<p>\u800c\u4e14&#xff0c;\u7f16\u8bd1\u5230\u4e00\u534a\u5c31\u62a5\u9519&#xff0c;\u5185\u5b58\u4e0d\u591f&#xff0c;CPU \u8dd1\u6ee1&#xff0c;Docker \u5bb9\u5668\u5404\u79cd\u4f9d\u8d56\u95ee\u9898\u2026<\/p>\n<p>\u6298\u817e\u4e86\u4e09\u5929&#xff0c;\u6211\u7ec8\u4e8e\u628a OpenTenBase \u505a\u6210\u4e86 Docker \u4e00\u952e\u90e8\u7f72 \u7248\u672c&#xff01;<\/p>\n<p>\u73b0\u5728&#xff0c;\u53ea\u9700\u8981 2 \u547d\u4ee4\u5c31\u80fd\u542f\u52a8\u5b8c\u6574\u7684 OpenTenBase \u96c6\u7fa4\u3002<\/p>\n<hr \/>\n<h3>\u4e00\u3001OpenTenBase \u662f\u4ec0\u4e48<\/h3>\n<p>OpenTenBase \u662f\u817e\u8baf\u5f00\u6e90\u7684\u5206\u5e03\u5f0f HTAP \u6570\u636e\u5e93&#xff0c;\u57fa\u4e8e PostgreSQL 10 \u5f00\u53d1\u3002<\/p>\n<p>\u7b80\u5355\u8bf4&#xff1a;<\/p>\n<ul>\n<li>HTAP: \u540c\u65f6\u652f\u6301 OLTP&#xff08;\u4e8b\u52a1&#xff09;\u548c OLAP&#xff08;\u5206\u6790&#xff09;<\/li>\n<li>\u5206\u5e03\u5f0f: \u652f\u6301\u6c34\u5e73\u6269\u5c55&#xff0c;\u6570\u636e\u81ea\u52a8\u5206\u7247<\/li>\n<li>\u9ad8\u53ef\u7528: \u652f\u6301\u4e3b\u5907\u5207\u6362\u3001\u6545\u969c\u81ea\u52a8\u6062\u590d<\/li>\n<\/ul>\n<p>\u67b6\u6784\u662f\u8fd9\u6837\u7684&#xff1a;<\/p>\n<p>\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510<br \/>\n\u2502                     OpenTenBase \u96c6\u7fa4                         \u2502<br \/>\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524<br \/>\n\u2502                                                              \u2502<br \/>\n\u2502    \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510                                              \u2502<br \/>\n\u2502    \u2502   GTM    \u2502 \u2190 \u5168\u5c40\u4e8b\u52a1\u7ba1\u7406\u5668&#xff08;Port: 6666&#xff09;              \u2502<br \/>\n\u2502    \u2514\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2518                                              \u2502<br \/>\n\u2502          \u2502                                                   \u2502<br \/>\n\u2502    \u250c\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2510                                              \u2502<br \/>\n\u2502    \u2502          \u2502                                              \u2502<br \/>\n\u2502 \u250c\u2500\u2500\u25bc\u2500\u2500\u2500\u2510  \u250c\u2500\u2500\u25bc\u2500\u2500\u2500\u2510         \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510                       \u2502<br \/>\n\u2502 \u2502 CN1  \u2502  \u2502 CN2  \u2502  &#8230;    \u2502  CNx   \u2502 \u2190 \u534f\u8c03\u8282\u70b9&#xff08;Port: 5432&#xff09; \u2502<br \/>\n\u2502 \u2514\u2500\u2500\u252c\u2500\u2500\u2500\u2518  \u2514\u2500\u2500\u252c\u2500\u2500\u2500\u2518         \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518                       \u2502<br \/>\n\u2502    \u2502        \u2502                                                   \u2502<br \/>\n\u2502    \u2514\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2518                                                   \u2502<br \/>\n\u2502         \u2502                                                       \u2502<br \/>\n\u2502    \u250c\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2510                                                  \u2502<br \/>\n\u2502    \u2502         \u2502                                                  \u2502<br \/>\n\u2502 \u250c\u2500\u2500\u25bc\u2500\u2500\u2500\u2510 \u250c\u2500\u2500\u25bc\u2500\u2500\u2500\u2510        \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510                          \u2502<br \/>\n\u2502 \u2502 DN1  \u2502 \u2502 DN2  \u2502  &#8230;   \u2502  DNx   \u2502 \u2190 \u6570\u636e\u8282\u70b9&#xff08;Port: 15432&#xff09; \u2502<br \/>\n\u2502 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2518        \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518                          \u2502<br \/>\n\u2502                                                              \u2502<br \/>\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260829111728-6a92bfc805b11.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<hr \/>\n<h3>\u4e8c\u3001\u4e3a\u4ec0\u4e48\u5b98\u65b9\u90e8\u7f72\u75db\u82e6<\/h3>\n<h4>2.1 \u5b98\u65b9\u90e8\u7f72\u6d41\u7a0b&#xff08;14 \u4e2a\u6b65\u9aa4&#xff01;&#xff09;<\/h4>\n<p><span class=\"token comment\"># 1. \u514b\u9686\u6e90\u7801<\/span><br \/>\n<span class=\"token function\">git<\/span> clone https:\/\/github.com\/OpenTenBase\/OpenTenBase.git<\/p>\n<p><span class=\"token comment\"># 2. \u5b89\u88c5\u4f9d\u8d56&#xff08;30&#043; \u4e2a\u5305&#xff09;<\/span><br \/>\n<span class=\"token function\">apt<\/span> <span class=\"token function\">install<\/span> build-essential bison flex perl <span class=\"token punctuation\">\\\\<\/span><br \/>\n    libreadline-dev zlib1g-dev libssl-dev libpam0g-dev <span class=\"token punctuation\">\\\\<\/span><br \/>\n    libxml2-dev libldap2-dev libossp-uuid-dev uuid-dev <span class=\"token punctuation\">\\\\<\/span><br \/>\n    libcurl4-openssl-dev liblz4-dev libzstd-dev <span class=\"token punctuation\">\\\\<\/span><br \/>\n    libcli11-dev libpqxx-dev libtool pkg-config<\/p>\n<p><span class=\"token comment\"># 3. \u7f16\u8bd1&#xff08;30-60 \u5206\u949f&#xff09;<\/span><br \/>\n.\/configure <span class=\"token parameter variable\">&#8211;prefix<\/span><span class=\"token operator\">&#061;<\/span>\/usr\/local\/opentenbase<br \/>\n<span class=\"token function\">make<\/span> <span class=\"token parameter variable\">-j4<\/span><br \/>\n<span class=\"token function\">make<\/span> <span class=\"token function\">install<\/span><\/p>\n<p><span class=\"token comment\"># 4. \u521d\u59cb\u5316 GTM<\/span><br \/>\ninitgtm <span class=\"token parameter variable\">-D<\/span> \/path\/to\/gtm_data<\/p>\n<p><span class=\"token comment\"># 5. \u521d\u59cb\u5316 Coordinator<\/span><br \/>\ninitdb <span class=\"token parameter variable\">-D<\/span> \/path\/to\/coord_data <span class=\"token punctuation\">\\\\<\/span><br \/>\n  <span class=\"token parameter variable\">&#8211;nodename<\/span><span class=\"token operator\">&#061;<\/span>coord1 <span class=\"token parameter variable\">&#8211;nodetype<\/span><span class=\"token operator\">&#061;<\/span>coordinator <span class=\"token punctuation\">\\\\<\/span><br \/>\n  <span class=\"token parameter variable\">&#8211;master_gtm_nodename<\/span><span class=\"token operator\">&#061;<\/span>gtm_master <span class=\"token punctuation\">\\\\<\/span><br \/>\n  <span class=\"token parameter variable\">&#8211;master_gtm_ip<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">127.0<\/span>.0.1 <span class=\"token punctuation\">\\\\<\/span><br \/>\n  <span class=\"token parameter variable\">&#8211;master_gtm_port<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">6666<\/span><\/p>\n<p><span class=\"token comment\"># 6. \u521d\u59cb\u5316 Datanode<\/span><br \/>\ninitdb <span class=\"token parameter variable\">-D<\/span> \/path\/to\/dn_data <span class=\"token punctuation\">\\\\<\/span><br \/>\n  <span class=\"token parameter variable\">&#8211;nodename<\/span><span class=\"token operator\">&#061;<\/span>dn001 <span class=\"token parameter variable\">&#8211;nodetype<\/span><span class=\"token operator\">&#061;<\/span>datanode <span class=\"token punctuation\">\\\\<\/span><br \/>\n  <span class=\"token parameter variable\">&#8211;master_gtm_nodename<\/span><span class=\"token operator\">&#061;<\/span>gtm_master <span class=\"token punctuation\">\\\\<\/span><br \/>\n  <span class=\"token parameter variable\">&#8211;master_gtm_ip<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">127.0<\/span>.0.1 <span class=\"token punctuation\">\\\\<\/span><br \/>\n  <span class=\"token parameter variable\">&#8211;master_gtm_port<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">6666<\/span><\/p>\n<p><span class=\"token comment\"># 7. \u914d\u7f6e postgresql.conf<\/span><br \/>\n<span class=\"token function\">vim<\/span> \/path\/to\/coord_data\/postgresql.conf<br \/>\n<span class=\"token function\">vim<\/span> \/path\/to\/dn_data\/postgresql.conf<\/p>\n<p><span class=\"token comment\"># 8. \u542f\u52a8 GTM<\/span><br \/>\ngtm_ctl <span class=\"token parameter variable\">-D<\/span> \/path\/to\/gtm_data start<\/p>\n<p><span class=\"token comment\"># 9. \u542f\u52a8 Coordinator<\/span><br \/>\npg_ctl <span class=\"token parameter variable\">-D<\/span> \/path\/to\/coord_data start<\/p>\n<p><span class=\"token comment\"># 10. \u542f\u52a8 Datanode<\/span><br \/>\npg_ctl <span class=\"token parameter variable\">-D<\/span> \/path\/to\/dn_data start<\/p>\n<p><span class=\"token comment\"># 11. \u6ce8\u518c\u8282\u70b9&#xff08;\u5728 Coordinator \u4e0a\u6267\u884c&#xff09;<\/span><br \/>\npsql <span class=\"token parameter variable\">-p<\/span> <span class=\"token number\">5432<\/span> <span class=\"token parameter variable\">-c<\/span> <span class=\"token string\">&#034;CREATE GTM NODE gtm_master WITH (HOST&#061;&#039;127.0.0.1&#039;, PORT&#061;6666, PRIMARY);&#034;<\/span><br \/>\npsql <span class=\"token parameter variable\">-p<\/span> <span class=\"token number\">5432<\/span> <span class=\"token parameter variable\">-c<\/span> <span class=\"token string\">&#034;CREATE NODE coord1 WITH (TYPE&#061;&#039;coordinator&#039;, HOST&#061;&#039;127.0.0.1&#039;, PORT&#061;5432, FORWARD&#061;6669);&#034;<\/span><br \/>\npsql <span class=\"token parameter variable\">-p<\/span> <span class=\"token number\">5432<\/span> <span class=\"token parameter variable\">-c<\/span> <span class=\"token string\">&#034;CREATE NODE dn001 WITH (TYPE&#061;&#039;datanode&#039;, HOST&#061;&#039;127.0.0.1&#039;, PORT&#061;15432, FORWARD&#061;6670, PRIMARY, PREFERRED);&#034;<\/span><\/p>\n<p><span class=\"token comment\"># 12. \u6ce8\u518c\u8282\u70b9&#xff08;\u5728 Datanode \u4e0a\u6267\u884c&#xff09;<\/span><br \/>\npsql <span class=\"token parameter variable\">-p<\/span> <span class=\"token number\">15432<\/span> <span class=\"token parameter variable\">-c<\/span> <span class=\"token string\">&#034;CREATE GTM NODE gtm_master WITH (HOST&#061;&#039;127.0.0.1&#039;, PORT&#061;6666, PRIMARY);&#034;<\/span><br \/>\npsql <span class=\"token parameter variable\">-p<\/span> <span class=\"token number\">15432<\/span> <span class=\"token parameter variable\">-c<\/span> <span class=\"token string\">&#034;CREATE NODE coord1 WITH (TYPE&#061;&#039;coordinator&#039;, HOST&#061;&#039;127.0.0.1&#039;, PORT&#061;5432);&#034;<\/span><\/p>\n<p><span class=\"token comment\"># 13. \u91cd\u8f7d\u8fde\u63a5\u6c60<\/span><br \/>\npsql <span class=\"token parameter variable\">-p<\/span> <span class=\"token number\">5432<\/span> <span class=\"token parameter variable\">-c<\/span> <span class=\"token string\">&#034;SELECT pgxc_pool_reload();&#034;<\/span><\/p>\n<p><span class=\"token comment\"># 14. \u8bbe\u7f6e\u9ed8\u8ba4\u8282\u70b9\u7ec4<\/span><br \/>\npsql <span class=\"token parameter variable\">-p<\/span> <span class=\"token number\">5432<\/span> <span class=\"token parameter variable\">-c<\/span> <span class=\"token string\">&#034;CREATE NODE GROUP default_group WITH (dn001);&#034;<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260829111729-6a92bfc976c00.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u4efb\u4f55\u4e00\u4e2a\u6b65\u9aa4\u51fa\u9519&#xff0c;\u6574\u4e2a\u96c6\u7fa4\u5c31\u65e0\u6cd5\u542f\u52a8\u3002<\/p>\n<p>\u800c\u4e14&#xff1a;<\/p>\n<ul>\n<li>\u7f16\u8bd1\u9700\u8981 30-60 \u5206\u949f<\/li>\n<li>2G \u670d\u52a1\u5668\u5185\u5b58\u4e0d\u591f<\/li>\n<li>\u4f9d\u8d56\u5305\u95ee\u9898\u9891\u7e41<\/li>\n<li>\u7aef\u53e3\u51b2\u7a81\u3001\u6743\u9650\u95ee\u9898<\/li>\n<li>\u914d\u7f6e\u6587\u4ef6\u590d\u6742<\/li>\n<\/ul>\n<h4>2.2 \u6211\u9047\u5230\u7684\u5751<\/h4>\n<h5>\u5751 1&#xff1a;\u7f16\u8bd1\u5185\u5b58\u4e0d\u591f<\/h5>\n<p>\u9519\u8bef\u4fe1\u606f&#xff1a;<\/p>\n<p>c&#043;&#043;: internal compiler error: Killed (program cc1plus)<\/p>\n<p>\u539f\u56e0&#xff1a;2G \u5185\u5b58\u4e0d\u591f\u7f16\u8bd1 OpenTenBase<\/p>\n<p>\u89e3\u51b3&#xff1a;\u589e\u52a0 swap \u6216\u8005\u7528\u66f4\u5927\u7684\u670d\u52a1\u5668<\/p>\n<p>[\u5360\u4f4d\u7b26&#xff1a;\u7f16\u8bd1\u62a5\u9519\u622a\u56fe]<\/p>\n<h5>\u5751 2&#xff1a;\u4f9d\u8d56\u5305\u627e\u4e0d\u5230<\/h5>\n<p>\u9519\u8bef\u4fe1\u606f&#xff1a;<\/p>\n<p>E: Unable to locate package libcli11-dev<br \/>\nE: Package libpqxx-dev is not available<\/p>\n<p>\u539f\u56e0&#xff1a;\u4e0d\u540c Ubuntu \u7248\u672c\u5305\u540d\u4e0d\u540c<\/p>\n<p>\u89e3\u51b3&#xff1a;<\/p>\n<p><span class=\"token function\">apt-get<\/span> <span class=\"token function\">install<\/span> <span class=\"token parameter variable\">-y<\/span> libcli11-dev <span class=\"token operator\">||<\/span> <span class=\"token function\">apt-get<\/span> <span class=\"token function\">install<\/span> <span class=\"token parameter variable\">-y<\/span> libcli-dev<br \/>\n<span class=\"token function\">apt-get<\/span> <span class=\"token function\">install<\/span> <span class=\"token parameter variable\">-y<\/span> libpqxx-dev <span class=\"token operator\">||<\/span> <span class=\"token function\">apt-get<\/span> <span class=\"token function\">install<\/span> <span class=\"token parameter variable\">-y<\/span> libpqxx-7-dev<\/p>\n<h5>\u5751 3&#xff1a;GTM \u521d\u59cb\u5316\u5931\u8d25<\/h5>\n<p>\u9519\u8bef\u4fe1\u606f&#xff1a;<\/p>\n<p>initgtm: could not initialize GTM<\/p>\n<p>\u539f\u56e0&#xff1a;\u7aef\u53e3\u51b2\u7a81\u6216\u6743\u9650\u95ee\u9898<\/p>\n<p>\u89e3\u51b3&#xff1a;\u68c0\u67e5\u7aef\u53e3\u5360\u7528&#xff0c;\u786e\u4fdd\u7528\u6237\u6743\u9650<\/p>\n<h5>\u5751 4&#xff1a;\u8282\u70b9\u6ce8\u518c\u5931\u8d25<\/h5>\n<p>\u9519\u8bef\u4fe1\u606f&#xff1a;<\/p>\n<p>ERROR: can not get master gtm info from pgxc_node<\/p>\n<p>\u539f\u56e0&#xff1a;OpenTenBase v5.0 \u6539\u7528 pgxc_node \u8868\u6ce8\u518c\u8282\u70b9<\/p>\n<p>\u89e3\u51b3&#xff1a;<\/p>\n<p><span class=\"token keyword\">CREATE<\/span> GTM NODE gtm_master <span class=\"token keyword\">WITH<\/span> <span class=\"token punctuation\">(<\/span>HOST<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#039;127.0.0.1&#039;<\/span><span class=\"token punctuation\">,<\/span> PORT<span class=\"token operator\">&#061;<\/span><span class=\"token number\">6666<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">PRIMARY<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">CREATE<\/span> NODE coord1 <span class=\"token keyword\">WITH<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token keyword\">TYPE<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#039;coordinator&#039;<\/span><span class=\"token punctuation\">,<\/span> HOST<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#039;127.0.0.1&#039;<\/span><span class=\"token punctuation\">,<\/span> PORT<span class=\"token operator\">&#061;<\/span><span class=\"token number\">5432<\/span><span class=\"token punctuation\">,<\/span> FORWARD<span class=\"token operator\">&#061;<\/span><span class=\"token number\">6669<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<h5>\u5751 5&#xff1a;Docker \u7f51\u7edc\u95ee\u9898<\/h5>\n<p>\u9519\u8bef\u4fe1\u606f&#xff1a;<\/p>\n<p>could not connect to GTM: Connection refused<\/p>\n<p>\u539f\u56e0&#xff1a;Docker \u5bb9\u5668\u7f51\u7edc\u9694\u79bb<\/p>\n<p>\u89e3\u51b3&#xff1a;\u4f7f\u7528 Docker network \u548c hostname \u8fde\u63a5<\/p>\n<h5>\u5751 6&#xff1a;128-bit atomics \u94fe\u63a5\u9519\u8bef<\/h5>\n<p>\u9519\u8bef\u4fe1\u606f&#xff1a;<\/p>\n<p>undefined reference to &#096;__sync_val_compare_and_swap_16&#039;<\/p>\n<p>\u539f\u56e0&#xff1a;Debian 11\/12 \u7684 libatomic \u4e0d\u652f\u6301 128-bit atomics<\/p>\n<p>\u89e3\u51b3&#xff1a;\u4f7f\u7528 __atomic_compare_exchange_n \u66ff\u4ee3<\/p>\n<hr \/>\n<h3>\u4e09\u3001\u6211\u7684\u89e3\u51b3\u65b9\u6848&#xff1a;Docker \u4e00\u952e\u90e8\u7f72<\/h3>\n<h4>3.1 \u6574\u4f53\u601d\u8def<\/h4>\n<p>\u4e0d\u505a\u6e90\u7801\u7f16\u8bd1&#xff0c;\u76f4\u63a5\u7528 .deb \u5305 &#043; Docker Compose\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260829111729-6a92bfc9cb266.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h4>3.2 \u73af\u5883\u51c6\u5907<\/h4>\n<p>\u670d\u52a1\u5668\u8981\u6c42&#xff1a;<\/p>\n<ul>\n<li>CPU: 1 \u6838&#043;<\/li>\n<li>\u5185\u5b58: 2GB&#043;<\/li>\n<li>\u78c1\u76d8: 10GB&#043;<\/li>\n<li>\u64cd\u4f5c\u7cfb\u7edf: Ubuntu 20.04\/22.04\/24.04, Debian 11\/12<\/li>\n<\/ul>\n<p>\u5b89\u88c5 Docker&#xff1a;<\/p>\n<p><span class=\"token comment\"># Ubuntu\/Debian<\/span><br \/>\n<span class=\"token function\">curl<\/span> <span class=\"token parameter variable\">-fsSL<\/span> https:\/\/get.docker.com <span class=\"token parameter variable\">-o<\/span> get-docker.sh<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">sh<\/span> get-docker.sh<\/p>\n<p><span class=\"token comment\"># \u5b89\u88c5 Docker Compose<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">apt-get<\/span> <span class=\"token function\">install<\/span> docker-compose-plugin<\/p>\n<hr \/>\n<h3>\u56db\u3001Dockerfile \u7f16\u5199<\/h3>\n<h4>4.1 \u8fd0\u884c\u65f6\u955c\u50cf<\/h4>\n<p>FROM ubuntu:24.04<\/p>\n<p># \u975e\u4ea4\u4e92\u6a21\u5f0f<br \/>\nENV DEBIAN_FRONTEND&#061;noninteractive<\/p>\n<p># \u5b89\u88c5\u4f9d\u8d56<br \/>\nRUN apt-get update &amp;&amp; apt-get install -y \\\\<br \/>\n    libreadline8 \\\\<br \/>\n    libssl3 \\\\<br \/>\n    libpam0g \\\\<br \/>\n    libxml2 \\\\<br \/>\n    libldap-2.5-0 \\\\<br \/>\n    libossp-uuid16 \\\\<br \/>\n    uuid-runtime \\\\<br \/>\n    libcurl4 \\\\<br \/>\n    liblz4-1 \\\\<br \/>\n    libzstd1 \\\\<br \/>\n    libssh2-1 \\\\<br \/>\n    &amp;&amp; rm -rf \/var\/lib\/apt\/lists\/*<\/p>\n<p># \u521b\u5efa\u7528\u6237<br \/>\nRUN useradd -r -m -s \/bin\/bash opentenbase<\/p>\n<p># \u590d\u5236 .deb \u5305<br \/>\nCOPY opentenbase_5.0-1ubuntu1_all.deb \/tmp\/<br \/>\nCOPY opentenbase-server_5.0-1ubuntu1_amd64.deb \/tmp\/<br \/>\nCOPY opentenbase-client_5.0-1ubuntu1_amd64.deb \/tmp\/<br \/>\nCOPY opentenbase-contrib_5.0-1ubuntu1_amd64.deb \/tmp\/<\/p>\n<p># \u5b89\u88c5\u5305<br \/>\nRUN dpkg -i \/tmp\/*.deb || apt-get install -f -y<\/p>\n<p># \u8bbe\u7f6e\u5de5\u4f5c\u76ee\u5f55<br \/>\nWORKDIR \/usr\/lib\/opentenbase<\/p>\n<p># \u66b4\u9732\u7aef\u53e3<br \/>\nEXPOSE 5432 6666 15432 6667 6668 6669 6670<\/p>\n<p># \u9ed8\u8ba4\u7528\u6237<br \/>\nUSER opentenbase<\/p>\n<p># \u9ed8\u8ba4\u547d\u4ee4<br \/>\nCMD [&#034;postgres&#034;]<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260829111730-6a92bfcad802f.png\" alt=\"**[\u5360\u4f4d\u7b26\uff1aDockerfile \u5b8c\u6574\u6587\u4ef6\u622a\u56fe]**\" \/><\/p>\n<h4>4.2 \u6784\u5efa\u955c\u50cf<\/h4>\n<p><span class=\"token comment\"># 1. \u4e0b\u8f7d .deb \u5305<\/span><br \/>\n<span class=\"token function\">wget<\/span> https:\/\/github.com\/muzimu217\/OpenTenBase-deb\/releases\/download\/v5.0-multi9\/opentenbase_5.0-1ubuntu1_all.deb<br \/>\n<span class=\"token function\">wget<\/span> https:\/\/github.com\/muzimu217\/OpenTenBase-deb\/releases\/download\/v5.0-multi9\/opentenbase-server_5.0-1ubuntu1_amd64.deb<br \/>\n<span class=\"token function\">wget<\/span> https:\/\/github.com\/muzimu217\/OpenTenBase-deb\/releases\/download\/v5.0-multi9\/opentenbase-client_5.0-1ubuntu1_amd64.deb<br \/>\n<span class=\"token function\">wget<\/span> https:\/\/github.com\/muzimu217\/OpenTenBase-deb\/releases\/download\/v5.0-multi9\/opentenbase-contrib_5.0-1ubuntu1_amd64.deb<\/p>\n<p><span class=\"token comment\"># 2. \u6784\u5efa\u955c\u50cf<\/span><br \/>\n<span class=\"token function\">docker<\/span> build <span class=\"token parameter variable\">-t<\/span> opentenbase\/opentenbase:5.0 <span class=\"token builtin class-name\">.<\/span><\/p>\n<p><span class=\"token comment\"># 3. \u67e5\u770b\u955c\u50cf<\/span><br \/>\n<span class=\"token function\">docker<\/span> images <span class=\"token operator\">|<\/span> <span class=\"token function\">grep<\/span> opentenbase<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260829111733-6a92bfcd53be7.png\" alt=\"**[\u5360\u4f4d\u7b26\uff1a\u6784\u5efa\u8fc7\u7a0b\u622a\u56fe]**\" \/># 1. \u4e0b\u8f7d .deb \u5305<br \/>\nwget https:\/\/github.com\/muzimu217\/OpenTenBase-deb\/releases\/download\/v5.0-multi8\/opentenbase_5.0-1ubuntu1_all.deb<br \/>\nwget https:\/\/github.com\/muzimu217\/OpenTenBase-deb\/releases\/download\/v5.0-multi8\/opentenbase-server_5.0-1ubuntu1_amd64.deb<br \/>\nwget https:\/\/github.com\/muzimu217\/OpenTenBase-deb\/releases\/download\/v5.0-multi8\/opentenbase-client_5.0-1ubuntu1_amd64.deb<br \/>\nwget https:\/\/github.com\/muzimu217\/OpenTenBase-deb\/releases\/download\/v5.0-multi8\/opentenbase-contrib_5.0-1ubuntu1_amd64.deb<\/p>\n<h2>2. \u6784\u5efa\u955c\u50cf<\/h2>\n<p>docker build -t opentenbase\/opentenbase:5.0 .<\/p>\n<h2>3. \u67e5\u770b\u955c\u50cf<\/h2>\n<p>docker images | grep opentenbase<\/p>\n<p>![**\\\\[\u5360\u4f4d\u7b26&#xff1a;\u6784\u5efa\u8fc7\u7a0b\u622a\u56fe\\\\]**](https:\/\/i-blog.csdnimg.cn\/direct\/a89eb52d7a3c45bcb06b92a035fd543f.png)<\/p>\n<p>&#8212;<\/p>\n<p>## \u4e94\u3001deb \u5305\u5236\u4f5c<\/p>\n<p>### 5.1 \u5305\u7ed3\u6784<\/p>\n<p>OpenTenBase \u5206\u6210 6 \u4e2a\u5305&#xff1a;<\/p>\n<p>| \u5305\u540d | \u63cf\u8ff0 | \u5927\u5c0f |<br \/>\n|&#8212;&#8212;|&#8212;&#8212;|&#8212;&#8212;|<br \/>\n| &#096;opentenbase&#096; | \u5143\u5305 | 2.2 KB |<br \/>\n| &#096;opentenbase-server&#096; | \u670d\u52a1\u5668\u7aef | 6.2 MB |<br \/>\n| &#096;opentenbase-client&#096; | \u5ba2\u6237\u7aef\u5de5\u5177 | 737 KB |<br \/>\n| &#096;opentenbase-contrib&#096; | \u6269\u5c55\u7ec4\u4ef6 | 1.4 MB |<br \/>\n| &#096;libopentenbase-dev&#096; | \u5f00\u53d1\u5e93 | 1.5 MB |<br \/>\n| &#096;opentenbase-doc&#096; | \u6587\u6863 | 2.6 MB |<\/p>\n<p>### 5.2 \u4e00\u952e\u5b89\u88c5\u811a\u672c<\/p>\n<p>&#096;&#096;&#096;bash<br \/>\ncurl -sLO https:\/\/github.com\/muzimu217\/OpenTenBase-deb\/releases\/download\/v5.0-multi9\/install.sh<br \/>\nsudo bash install.sh<\/p>\n<h4>5.3 \u6d4b\u8bd5\u9a8c\u8bc1\u6570\u636e\u5e93\u542f\u52a8<\/h4>\n<h5>\u521d\u59cb\u5316\u96c6\u7fa4<\/h5>\n<p><span class=\"token comment\"># \u521d\u59cb\u5316 GTM &#043; Coordinator &#043; Datanode<\/span><br \/>\nopentenbase-ctl init<\/p>\n<h5>\u542f\u52a8\u96c6\u7fa4<\/h5>\n<p><span class=\"token comment\"># \u542f\u52a8\u6240\u6709\u8282\u70b9<\/span><br \/>\nopentenbase-ctl start<\/p>\n<h5>\u68c0\u67e5\u72b6\u6001<\/h5>\n<p><span class=\"token comment\"># \u67e5\u770b\u96c6\u7fa4\u72b6\u6001<\/span><br \/>\nopentenbase-ctl status<\/p>\n<h5>\u8fde\u63a5\u6570\u636e\u5e93<\/h5>\n<p><span class=\"token comment\"># \u901a\u8fc7 psql \u8fde\u63a5<\/span><br \/>\nopentenbase-psql <span class=\"token parameter variable\">-h<\/span> <span class=\"token number\">127.0<\/span>.0.1 <span class=\"token parameter variable\">-p<\/span> <span class=\"token number\">5432<\/span> <span class=\"token parameter variable\">-U<\/span> opentenbase <span class=\"token parameter variable\">-d<\/span> postgres<\/p>\n<h5>\u505c\u6b62\u96c6\u7fa4<\/h5>\n<p><span class=\"token comment\"># \u505c\u6b62\u6240\u6709\u8282\u70b9<\/span><br \/>\nopentenbase-ctl stop<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260829111734-6a92bfce78ef6.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><br \/>\n<img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260829111734-6a92bfcec08da.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u597d\u4e86&#xff0c;\u8fd9\u4e2a\u65f6\u5019\u5c31\u53ef\u4ee5\u4f7f\u7528OpenTenBase\u6570\u636e\u5e93\u4e86<\/p>\n<h3>\u4ee5\u4e0a\u5185\u5bb9\u662f\u8f6f\u4ef6\u5305\u7684\u4e00\u952e\u90e8\u7f72\u6559\u7a0b&#xff0c;\u5982\u679c\u662f\u9700\u8981\u5f00\u53d1\u6570\u636e\u5e93\u7684\u4f6c\u53cb&#xff0c;\u76ee\u524d\u6211\u4eec\u8fd9\u8fb9\u4e5f\u662f\u652f\u6301Docker Compose \u4e00\u952e\u96c6\u7fa4\u90e8\u7f72&#xff1a;<\/h3>\n<h3>\u516d\u3001docker compose \u96c6\u7fa4<\/h3>\n<p>\u6b64\u5904\u662f\u6570\u636e\u5e93\u5f00\u53d1\u8005\u53c2\u8003\u5185\u5bb9<\/p>\n<h4>6.1 docker-compose.yml<\/h4>\n<p><span class=\"token key atrule\">version<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#039;3.8&#039;<\/span><\/p>\n<p><span class=\"token key atrule\">services<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">gtm<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">image<\/span><span class=\"token punctuation\">:<\/span> opentenbase\/opentenbase<span class=\"token punctuation\">:<\/span><span class=\"token number\">5.0<\/span><br \/>\n    <span class=\"token key atrule\">container_name<\/span><span class=\"token punctuation\">:<\/span> opentenbase<span class=\"token punctuation\">&#8211;<\/span>gtm<br \/>\n    <span class=\"token key atrule\">hostname<\/span><span class=\"token punctuation\">:<\/span> gtm<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;6666:6666&#034;<\/span><br \/>\n    <span class=\"token key atrule\">volumes<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> gtm_data<span class=\"token punctuation\">:<\/span>\/var\/lib\/opentenbase\/gtm<br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> gtm_log<span class=\"token punctuation\">:<\/span>\/var\/log\/opentenbase<br \/>\n    <span class=\"token key atrule\">environment<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> NODE_TYPE&#061;gtm<br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> GTM_PORT&#061;6666<br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> NODE_NAME&#061;gtm_master<br \/>\n    <span class=\"token key atrule\">networks<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> opentenbase<span class=\"token punctuation\">&#8211;<\/span>net<br \/>\n    <span class=\"token key atrule\">command<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token punctuation\">&gt;<\/span><span class=\"token scalar string\"><br \/>\n      bash -c &#034;<br \/>\n        install -d -o opentenbase -g opentenbase -m 0700 \/var\/lib\/opentenbase\/gtm<br \/>\n        su &#8211; opentenbase -c &#039;\/usr\/lib\/opentenbase\/bin\/initgtm -Z gtm -D \/var\/lib\/opentenbase\/gtm&#039;<br \/>\n        su &#8211; opentenbase -c &#039;\/usr\/lib\/opentenbase\/bin\/gtm_ctl -D \/var\/lib\/opentenbase\/gtm -l \/var\/log\/opentenbase\/gtm.log start&#039;<br \/>\n      &#034;<\/span><br \/>\n    <span class=\"token key atrule\">healthcheck<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token key atrule\">test<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;CMD&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;su&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;-&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;opentenbase&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;-c&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;pg_isready -p 6666&#034;<\/span><span class=\"token punctuation\">]<\/span><br \/>\n      <span class=\"token key atrule\">interval<\/span><span class=\"token punctuation\">:<\/span> 10s<br \/>\n      <span class=\"token key atrule\">timeout<\/span><span class=\"token punctuation\">:<\/span> 5s<br \/>\n      <span class=\"token key atrule\">retries<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token number\">5<\/span><\/p>\n<p>  <span class=\"token key atrule\">coordinator<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">image<\/span><span class=\"token punctuation\">:<\/span> opentenbase\/opentenbase<span class=\"token punctuation\">:<\/span><span class=\"token number\">5.0<\/span><br \/>\n    <span class=\"token key atrule\">container_name<\/span><span class=\"token punctuation\">:<\/span> opentenbase<span class=\"token punctuation\">&#8211;<\/span>coordinator<br \/>\n    <span class=\"token key atrule\">hostname<\/span><span class=\"token punctuation\">:<\/span> coordinator<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;5432:5432&#034;<\/span><br \/>\n    <span class=\"token key atrule\">volumes<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> coord_data<span class=\"token punctuation\">:<\/span>\/var\/lib\/opentenbase\/coordinator<br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> coord_log<span class=\"token punctuation\">:<\/span>\/var\/log\/opentenbase<br \/>\n    <span class=\"token key atrule\">environment<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> NODE_TYPE&#061;coordinator<br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> COORD_PORT&#061;5432<br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> GTM_HOST&#061;gtm<br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> GTM_PORT&#061;6666<br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> NODE_NAME&#061;coord1<br \/>\n    <span class=\"token key atrule\">networks<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> opentenbase<span class=\"token punctuation\">&#8211;<\/span>net<br \/>\n    <span class=\"token key atrule\">depends_on<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token key atrule\">gtm<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token key atrule\">condition<\/span><span class=\"token punctuation\">:<\/span> service_healthy<br \/>\n    <span class=\"token key atrule\">command<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token punctuation\">&gt;<\/span><span class=\"token scalar string\"><br \/>\n      bash -c &#034;<br \/>\n        install -d -o opentenbase -g opentenbase -m 0700 \/var\/lib\/opentenbase\/coordinator<br \/>\n        su &#8211; opentenbase -c &#039;\/usr\/lib\/opentenbase\/bin\/initdb -D \/var\/lib\/opentenbase\/coordinator &#8211;nodename&#061;coord1 &#8211;nodetype&#061;coordinator &#8211;master_gtm_nodename&#061;gtm_master &#8211;master_gtm_ip&#061;gtm &#8211;master_gtm_port&#061;6666 -E UTF8 -U opentenbase&#039;<br \/>\n        sed -i &#039;s\/port &#061; 5432\/port &#061; 5432\/&#039; \/var\/lib\/opentenbase\/coordinator\/postgresql.conf<br \/>\n        su &#8211; opentenbase -c &#039;\/usr\/lib\/opentenbase\/bin\/pg_ctl -D \/var\/lib\/opentenbase\/coordinator -l \/var\/log\/opentenbase\/coord.log start&#039;<br \/>\n        sleep 5<br \/>\n        su &#8211; opentenbase -c &#039;\/usr\/lib\/opentenbase\/bin\/psql -p 5432 -c \\\\&#034;CREATE GTM NODE gtm_master WITH (HOST&#061;\\\\\\\\&#039;gtm\\\\\\\\&#039;, PORT&#061;6666, PRIMARY);\\\\&#034;&#039;<br \/>\n        su &#8211; opentenbase -c &#039;\/usr\/lib\/opentenbase\/bin\/psql -p 5432 -c \\\\&#034;CREATE NODE coord1 WITH (TYPE&#061;\\\\\\\\&#039;coordinator\\\\\\\\&#039;, HOST&#061;\\\\\\\\&#039;coordinator\\\\\\\\&#039;, PORT&#061;5432, FORWARD&#061;6669);\\\\&#034;&#039;<br \/>\n        tail -f \/var\/log\/opentenbase\/coord.log<br \/>\n      &#034;<\/span><br \/>\n    <span class=\"token key atrule\">healthcheck<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token key atrule\">test<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;CMD&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;su&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;-&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;opentenbase&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;-c&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;pg_isready -p 5432&#034;<\/span><span class=\"token punctuation\">]<\/span><br \/>\n      <span class=\"token key atrule\">interval<\/span><span class=\"token punctuation\">:<\/span> 10s<br \/>\n      <span class=\"token key atrule\">timeout<\/span><span class=\"token punctuation\">:<\/span> 5s<br \/>\n      <span class=\"token key atrule\">retries<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token number\">5<\/span><\/p>\n<p>  <span class=\"token key atrule\">dn1<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">image<\/span><span class=\"token punctuation\">:<\/span> opentenbase\/opentenbase<span class=\"token punctuation\">:<\/span><span class=\"token number\">5.0<\/span><br \/>\n    <span class=\"token key atrule\">container_name<\/span><span class=\"token punctuation\">:<\/span> opentenbase<span class=\"token punctuation\">&#8211;<\/span>dn1<br \/>\n    <span class=\"token key atrule\">hostname<\/span><span class=\"token punctuation\">:<\/span> dn1<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;15432:15432&#034;<\/span><br \/>\n    <span class=\"token key atrule\">volumes<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> dn1_data<span class=\"token punctuation\">:<\/span>\/var\/lib\/opentenbase\/dn1<br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> dn1_log<span class=\"token punctuation\">:<\/span>\/var\/log\/opentenbase<br \/>\n    <span class=\"token key atrule\">environment<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> NODE_TYPE&#061;datanode<br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> DN_PORT&#061;15432<br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> GTM_HOST&#061;gtm<br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> GTM_PORT&#061;6666<br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> NODE_NAME&#061;dn001<br \/>\n    <span class=\"token key atrule\">networks<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> opentenbase<span class=\"token punctuation\">&#8211;<\/span>net<br \/>\n    <span class=\"token key atrule\">depends_on<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token key atrule\">coordinator<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token key atrule\">condition<\/span><span class=\"token punctuation\">:<\/span> service_healthy<br \/>\n    <span class=\"token key atrule\">command<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token punctuation\">&gt;<\/span><span class=\"token scalar string\"><br \/>\n      bash -c &#034;<br \/>\n        install -d -o opentenbase -g opentenbase -m 0700 \/var\/lib\/opentenbase\/dn1<br \/>\n        su &#8211; opentenbase -c &#039;\/usr\/lib\/opentenbase\/bin\/initdb -D \/var\/lib\/opentenbase\/dn1 &#8211;nodename&#061;dn001 &#8211;nodetype&#061;datanode &#8211;master_gtm_nodename&#061;gtm_master &#8211;master_gtm_ip&#061;gtm &#8211;master_gtm_port&#061;6666 -E UTF8 -U opentenbase&#039;<br \/>\n        su &#8211; opentenbase -c &#039;\/usr\/lib\/opentenbase\/bin\/pg_ctl -D \/var\/lib\/opentenbase\/dn1 -l \/var\/log\/opentenbase\/dn1.log start&#039;<br \/>\n        sleep 5<br \/>\n        su &#8211; opentenbase -c &#039;\/usr\/lib\/opentenbase\/bin\/psql -h coordinator -p 5432 -c \\\\&#034;CREATE NODE dn001 WITH (TYPE&#061;\\\\\\\\&#039;datanode\\\\\\\\&#039;, HOST&#061;\\\\\\\\&#039;dn1\\\\\\\\&#039;, PORT&#061;15432, FORWARD&#061;6670, PRIMARY, PREFERRED);\\\\&#034;&#039;<br \/>\n        su &#8211; opentenbase -c &#039;\/usr\/lib\/opentenbase\/bin\/psql -h coordinator -p 5432 -c \\\\&#034;SELECT pgxc_pool_reload();\\\\&#034;&#039;<br \/>\n        tail -f \/var\/log\/opentenbase\/dn1.log<br \/>\n      &#034;<\/span><br \/>\n    <span class=\"token key atrule\">healthcheck<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token key atrule\">test<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;CMD&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;su&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;-&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;opentenbase&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;-c&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;pg_isready -p 15432&#034;<\/span><span class=\"token punctuation\">]<\/span><br \/>\n      <span class=\"token key atrule\">interval<\/span><span class=\"token punctuation\">:<\/span> 10s<br \/>\n      <span class=\"token key atrule\">timeout<\/span><span class=\"token punctuation\">:<\/span> 5s<br \/>\n      <span class=\"token key atrule\">retries<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token number\">5<\/span><\/p>\n<p>  <span class=\"token key atrule\">dn2<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">image<\/span><span class=\"token punctuation\">:<\/span> opentenbase\/opentenbase<span class=\"token punctuation\">:<\/span><span class=\"token number\">5.0<\/span><br \/>\n    <span class=\"token key atrule\">container_name<\/span><span class=\"token punctuation\">:<\/span> opentenbase<span class=\"token punctuation\">&#8211;<\/span>dn2<br \/>\n    <span class=\"token key atrule\">hostname<\/span><span class=\"token punctuation\">:<\/span> dn2<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;15433:15433&#034;<\/span><br \/>\n    <span class=\"token key atrule\">volumes<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> dn2_data<span class=\"token punctuation\">:<\/span>\/var\/lib\/opentenbase\/dn2<br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> dn2_log<span class=\"token punctuation\">:<\/span>\/var\/log\/opentenbase<br \/>\n    <span class=\"token key atrule\">environment<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> NODE_TYPE&#061;datanode<br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> DN_PORT&#061;15433<br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> GTM_HOST&#061;gtm<br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> GTM_PORT&#061;6666<br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> NODE_NAME&#061;dn002<br \/>\n    <span class=\"token key atrule\">networks<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> opentenbase<span class=\"token punctuation\">&#8211;<\/span>net<br \/>\n    <span class=\"token key atrule\">depends_on<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token key atrule\">coordinator<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token key atrule\">condition<\/span><span class=\"token punctuation\">:<\/span> service_healthy<br \/>\n    <span class=\"token key atrule\">command<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token punctuation\">&gt;<\/span><span class=\"token scalar string\"><br \/>\n      bash -c &#034;<br \/>\n        install -d -o opentenbase -g opentenbase -m 0700 \/var\/lib\/opentenbase\/dn2<br \/>\n        su &#8211; opentenbase -c &#039;\/usr\/lib\/opentenbase\/bin\/initdb -D \/var\/lib\/opentenbase\/dn2 &#8211;nodename&#061;dn002 &#8211;nodetype&#061;datanode &#8211;master_gtm_nodename&#061;gtm_master &#8211;master_gtm_ip&#061;gtm &#8211;master_gtm_port&#061;6666 -E UTF8 -U opentenbase&#039;<br \/>\n        su &#8211; opentenbase -c &#039;\/usr\/lib\/opentenbase\/bin\/pg_ctl -D \/var\/lib\/opentenbase\/dn2 -l \/var\/log\/opentenbase\/dn2.log start&#039;<br \/>\n        sleep 5<br \/>\n        su &#8211; opentenbase -c &#039;\/usr\/lib\/opentenbase\/bin\/psql -h coordinator -p 5432 -c \\\\&#034;CREATE NODE dn002 WITH (TYPE&#061;\\\\\\\\&#039;datanode\\\\\\\\&#039;, HOST&#061;\\\\\\\\&#039;dn2\\\\\\\\&#039;, PORT&#061;15433, FORWARD&#061;6671);\\\\&#034;&#039;<br \/>\n        su &#8211; opentenbase -c &#039;\/usr\/lib\/opentenbase\/bin\/psql -h coordinator -p 5432 -c \\\\&#034;SELECT pgxc_pool_reload();\\\\&#034;&#039;<br \/>\n        tail -f \/var\/log\/opentenbase\/dn2.log<br \/>\n      &#034;<\/span><br \/>\n    <span class=\"token key atrule\">healthcheck<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token key atrule\">test<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;CMD&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;su&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;-&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;opentenbase&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;-c&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;pg_isready -p 15433&#034;<\/span><span class=\"token punctuation\">]<\/span><br \/>\n      <span class=\"token key atrule\">interval<\/span><span class=\"token punctuation\">:<\/span> 10s<br \/>\n      <span class=\"token key atrule\">timeout<\/span><span class=\"token punctuation\">:<\/span> 5s<br \/>\n      <span class=\"token key atrule\">retries<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token number\">5<\/span><\/p>\n<p><span class=\"token key atrule\">networks<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">opentenbase-net<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">driver<\/span><span class=\"token punctuation\">:<\/span> bridge<\/p>\n<p><span class=\"token key atrule\">volumes<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">gtm_data<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">gtm_log<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">coord_data<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">coord_log<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">dn1_data<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">dn1_log<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">dn2_data<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">dn2_log<\/span><span class=\"token punctuation\">:<\/span><\/p>\n<h4>6.2 \u542f\u52a8\u96c6\u7fa4<\/h4>\n<p><span class=\"token comment\"># 1. \u542f\u52a8\u96c6\u7fa4<\/span><br \/>\n<span class=\"token function\">docker<\/span> compose up <span class=\"token parameter variable\">-d<\/span><\/p>\n<p><span class=\"token comment\"># 2. \u67e5\u770b\u72b6\u6001<\/span><br \/>\n<span class=\"token function\">docker<\/span> compose <span class=\"token function\">ps<\/span><\/p>\n<p>\u8f93\u51fa\u5e94\u8be5\u662f\u8fd9\u6837&#xff1a;<\/p>\n<p>NAME                    COMMAND                  SERVICE        STATUS<br \/>\nopentenbase-coordinator  &#034;bash -c install -d \u2026&#034;   coordinator    running<br \/>\nopentenbase-dn1          &#034;bash -c install -d \u2026&#034;   dn1            running<br \/>\nopentenbase-dn2          &#034;bash -c install -d \u2026&#034;   dn2            running<br \/>\nopentenbase-gtm          &#034;bash -c install -d \u2026&#034;   gtm            running<\/p>\n<hr \/>\n<h3>\u4e03\u3001\u521d\u59cb\u5316\u6570\u636e\u5e93<\/h3>\n<h4>7.1 \u7b49\u5f85\u670d\u52a1\u5c31\u7eea&#xff08;docker&#xff09;<\/h4>\n<p><span class=\"token comment\"># \u67e5\u770b\u65e5\u5fd7<\/span><br \/>\n<span class=\"token function\">docker<\/span> compose logs <span class=\"token parameter variable\">-f<\/span> coordinator<\/p>\n<p><span class=\"token comment\"># \u7b49\u5f85\u770b\u5230\u7c7b\u4f3c\u8fd9\u6837\u7684\u8f93\u51fa&#xff1a;<\/span><br \/>\n<span class=\"token comment\"># LOG:  database system is ready to accept connections<\/span><\/p>\n<h4>7.2 \u8fde\u63a5\u6570\u636e\u5e93&#xff08;docker&#xff09;<\/h4>\n<p><span class=\"token comment\"># \u8fde\u63a5 Coordinator<\/span><br \/>\n<span class=\"token function\">docker<\/span> <span class=\"token builtin class-name\">exec<\/span> <span class=\"token parameter variable\">-it<\/span> opentenbase-coordinator <span class=\"token punctuation\">\\\\<\/span><br \/>\n  \/usr\/lib\/opentenbase\/bin\/psql <span class=\"token parameter variable\">-U<\/span> opentenbase <span class=\"token parameter variable\">-d<\/span> postgres<\/p>\n<hr \/>\n<h3>\u516b\u3001\u5e38\u89c1\u62a5\u9519\u89e3\u51b3<\/h3>\n<h4>8.1 \u5bb9\u5668\u542f\u52a8\u5931\u8d25<\/h4>\n<p>\u9519\u8bef&#xff1a;<\/p>\n<p>Error: Container failed to start<\/p>\n<p>\u89e3\u51b3&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u65e5\u5fd7<\/span><br \/>\n<span class=\"token function\">docker<\/span> compose logs coordinator<\/p>\n<p><span class=\"token comment\"># \u5e38\u89c1\u539f\u56e0&#xff1a;<\/span><br \/>\n<span class=\"token comment\"># 1. GTM \u6ca1\u542f\u52a8\u6210\u529f<\/span><br \/>\n<span class=\"token comment\"># 2. \u7aef\u53e3\u51b2\u7a81<\/span><br \/>\n<span class=\"token comment\"># 3. \u5185\u5b58\u4e0d\u591f<\/span><\/p>\n<p><span class=\"token comment\"># \u68c0\u67e5\u7aef\u53e3<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">netstat<\/span> <span class=\"token parameter variable\">-tlnp<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">grep<\/span> <span class=\"token parameter variable\">-E<\/span> <span class=\"token string\">&#039;(5432|6666|15432)&#039;<\/span><\/p>\n<p><span class=\"token comment\"># \u68c0\u67e5\u5185\u5b58<\/span><br \/>\n<span class=\"token function\">free<\/span> <span class=\"token parameter variable\">-h<\/span><\/p>\n<h4>8.2 \u8282\u70b9\u6ce8\u518c\u5931\u8d25<\/h4>\n<p>\u9519\u8bef&#xff1a;<\/p>\n<p>ERROR: can not get master gtm info from pgxc_node<\/p>\n<p>\u89e3\u51b3&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u68c0\u67e5 GTM \u662f\u5426\u8fd0\u884c<\/span><br \/>\n<span class=\"token function\">docker<\/span> compose <span class=\"token builtin class-name\">exec<\/span> gtm pg_isready <span class=\"token parameter variable\">-p<\/span> <span class=\"token number\">6666<\/span><\/p>\n<p><span class=\"token comment\"># \u68c0\u67e5\u8282\u70b9\u662f\u5426\u6ce8\u518c<\/span><br \/>\n<span class=\"token function\">docker<\/span> compose <span class=\"token builtin class-name\">exec<\/span> coordinator <span class=\"token punctuation\">\\\\<\/span><br \/>\n  \/usr\/lib\/opentenbase\/bin\/psql <span class=\"token parameter variable\">-c<\/span> <span class=\"token string\">&#034;SELECT * FROM pgxc_node;&#034;<\/span><\/p>\n<p><span class=\"token comment\"># \u624b\u52a8\u6ce8\u518c&#xff08;\u5982\u679c\u9700\u8981&#xff09;<\/span><br \/>\n<span class=\"token function\">docker<\/span> compose <span class=\"token builtin class-name\">exec<\/span> coordinator <span class=\"token punctuation\">\\\\<\/span><br \/>\n  \/usr\/lib\/opentenbase\/bin\/psql <span class=\"token parameter variable\">-c<\/span> <span class=\"token string\">&#034;CREATE GTM NODE gtm_master WITH (HOST&#061;&#039;gtm&#039;, PORT&#061;6666, PRIMARY);&#034;<\/span><\/p>\n<h4>8.3 \u8fde\u63a5\u88ab\u62d2\u7edd<\/h4>\n<p>\u9519\u8bef&#xff1a;<\/p>\n<p>psql: error: could not connect to server: Connection refused<\/p>\n<p>\u89e3\u51b3&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u68c0\u67e5\u670d\u52a1\u662f\u5426\u8fd0\u884c<\/span><br \/>\n<span class=\"token function\">docker<\/span> compose <span class=\"token function\">ps<\/span><\/p>\n<p><span class=\"token comment\"># \u68c0\u67e5\u7aef\u53e3\u662f\u5426\u76d1\u542c<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">netstat<\/span> <span class=\"token parameter variable\">-tlnp<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">grep<\/span> <span class=\"token number\">5432<\/span><\/p>\n<p><span class=\"token comment\"># \u68c0\u67e5\u9632\u706b\u5899<\/span><br \/>\n<span class=\"token function\">sudo<\/span> ufw status<\/p>\n<p><span class=\"token comment\"># \u68c0\u67e5\u65e5\u5fd7<\/span><br \/>\n<span class=\"token function\">docker<\/span> compose logs coordinator<\/p>\n<h4>8.4 Docker \u5185\u5b58\u4e0d\u591f<\/h4>\n<p>\u9519\u8bef&#xff1a;<\/p>\n<p>OOMKilled<\/p>\n<p>\u89e3\u51b3&#xff1a;<\/p>\n<p><span class=\"token comment\"># docker-compose.yml \u6dfb\u52a0\u5185\u5b58\u9650\u5236<\/span><br \/>\n<span class=\"token key atrule\">services<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">coordinator<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">mem_limit<\/span><span class=\"token punctuation\">:<\/span> 1g<br \/>\n    <span class=\"token key atrule\">shm_size<\/span><span class=\"token punctuation\">:<\/span> 512mb<\/p>\n<p>  <span class=\"token key atrule\">dn1<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">mem_limit<\/span><span class=\"token punctuation\">:<\/span> 1g<br \/>\n    <span class=\"token key atrule\">shm_size<\/span><span class=\"token punctuation\">:<\/span> 512mb<\/p>\n<hr \/>\n<h3>\u4e5d\u3001SQL \u6d4b\u8bd5<\/h3>\n<h4>9.1 \u57fa\u7840\u6d4b\u8bd5<\/h4>\n<p><span class=\"token comment\">&#8212; \u67e5\u770b\u7248\u672c<\/span><br \/>\n<span class=\"token keyword\">SELECT<\/span> version<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">&#8212; \u67e5\u770b\u8282\u70b9<\/span><br \/>\n<span class=\"token keyword\">SELECT<\/span> <span class=\"token operator\">*<\/span> <span class=\"token keyword\">FROM<\/span> pgxc_node<span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">&#8212; \u521b\u5efa\u6d4b\u8bd5\u8868<\/span><br \/>\n<span class=\"token keyword\">CREATE<\/span> <span class=\"token keyword\">TABLE<\/span> test <span class=\"token punctuation\">(<\/span>id <span class=\"token keyword\">INT<\/span><span class=\"token punctuation\">,<\/span> name <span class=\"token keyword\">TEXT<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">&#8212; \u63d2\u5165\u6570\u636e<\/span><br \/>\n<span class=\"token keyword\">INSERT<\/span> <span class=\"token keyword\">INTO<\/span> test <span class=\"token keyword\">VALUES<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;Alice&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token number\">2<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;Bob&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">&#8212; \u67e5\u8be2\u6570\u636e<\/span><br \/>\n<span class=\"token keyword\">SELECT<\/span> <span class=\"token operator\">*<\/span> <span class=\"token keyword\">FROM<\/span> test<span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">&#8212; \u805a\u5408\u67e5\u8be2<\/span><br \/>\n<span class=\"token keyword\">SELECT<\/span> <span class=\"token function\">COUNT<\/span><span class=\"token punctuation\">(<\/span><span class=\"token operator\">*<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token function\">AVG<\/span><span class=\"token punctuation\">(<\/span>id<span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">FROM<\/span> test<span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">&#8212; \u5206\u5e03\u5f0f\u67e5\u8be2<\/span><br \/>\n<span class=\"token keyword\">SELECT<\/span> <span class=\"token operator\">*<\/span> <span class=\"token keyword\">FROM<\/span> test <span class=\"token keyword\">WHERE<\/span> id <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<h4>9.2 \u6027\u80fd\u6d4b\u8bd5<\/h4>\n<p><span class=\"token comment\">&#8212; \u521b\u5efa\u5927\u8868<\/span><br \/>\n<span class=\"token keyword\">CREATE<\/span> <span class=\"token keyword\">TABLE<\/span> big_test <span class=\"token punctuation\">(<\/span>id <span class=\"token keyword\">INT<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">data<\/span> <span class=\"token keyword\">TEXT<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">&#8212; \u63d2\u5165 10 \u4e07\u6761\u6570\u636e<\/span><br \/>\n<span class=\"token keyword\">INSERT<\/span> <span class=\"token keyword\">INTO<\/span> big_test<br \/>\n<span class=\"token keyword\">SELECT<\/span> generate_series<span class=\"token punctuation\">(<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">100000<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;test data&#039;<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">&#8212; \u67e5\u8be2\u6027\u80fd<\/span><br \/>\n<span class=\"token keyword\">EXPLAIN<\/span> <span class=\"token keyword\">ANALYZE<\/span> <span class=\"token keyword\">SELECT<\/span> <span class=\"token function\">COUNT<\/span><span class=\"token punctuation\">(<\/span><span class=\"token operator\">*<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">FROM<\/span> big_test<span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">&#8212; \u5206\u5e03\u5f0f\u67e5\u8be2\u6027\u80fd<\/span><br \/>\n<span class=\"token keyword\">EXPLAIN<\/span> <span class=\"token keyword\">ANALYZE<\/span> <span class=\"token keyword\">SELECT<\/span> <span class=\"token operator\">*<\/span> <span class=\"token keyword\">FROM<\/span> big_test <span class=\"token keyword\">WHERE<\/span> id <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">50000<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<hr \/>\n<h3>\u5341\u3001\u6700\u7ec8\u6548\u679c<\/h3>\n<h4>10.1 \u8d44\u6e90\u5360\u7528<\/h4>\n<p>\u6d4b\u8bd5\u73af\u5883&#xff1a;<\/p>\n<ul>\n<li>CPU: 1 \u6838<\/li>\n<li>\u5185\u5b58: 2GB<\/li>\n<li>\u78c1\u76d8: 20GB<\/li>\n<\/ul>\n<p>\u7ed3\u679c&#xff1a;<\/p>\n<table>\n<tr>\u8282\u70b9CPU\u5185\u5b58\u78c1\u76d8<\/tr>\n<tbody>\n<tr>\n<td>GTM<\/td>\n<td>&lt; 5%<\/td>\n<td>50MB<\/td>\n<td>20MB<\/td>\n<\/tr>\n<tr>\n<td>Coordinator<\/td>\n<td>10-20%<\/td>\n<td>100MB<\/td>\n<td>50MB<\/td>\n<\/tr>\n<tr>\n<td>Datanode 1<\/td>\n<td>10-20%<\/td>\n<td>100MB<\/td>\n<td>50MB<\/td>\n<\/tr>\n<tr>\n<td>Datanode 2<\/td>\n<td>10-20%<\/td>\n<td>100MB<\/td>\n<td>50MB<\/td>\n<\/tr>\n<tr>\n<td>\u603b\u8ba1<\/td>\n<td>35-65%<\/td>\n<td>350MB<\/td>\n<td>170MB<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>2G \u670d\u52a1\u5668\u5b8c\u5168\u591f\u7528&#xff01;<\/p>\n<h4>10.2 \u90e8\u7f72\u65f6\u95f4\u5bf9\u6bd4<\/h4>\n<table>\n<tr>\u65b9\u5f0f\u65f6\u95f4\u6b65\u9aa4<\/tr>\n<tbody>\n<tr>\n<td>\u5b98\u65b9\u7f16\u8bd1<\/td>\n<td>2-3 \u5c0f\u65f6<\/td>\n<td>14 \u6b65<\/td>\n<\/tr>\n<tr>\n<td>\u6211\u7684\u65b9\u6848<\/td>\n<td>5 \u5206\u949f<\/td>\n<td>1 \u547d\u4ee4<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>10.3 \u6700\u7ec8\u6548\u679c<\/h4>\n<p><span class=\"token comment\"># \u4e00\u952e\u542f\u52a8<\/span><br \/>\n<span class=\"token function\">docker<\/span> compose up <span class=\"token parameter variable\">-d<\/span><\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u96c6\u7fa4\u72b6\u6001<\/span><br \/>\n<span class=\"token function\">docker<\/span> compose <span class=\"token function\">ps<\/span><\/p>\n<p><span class=\"token comment\"># \u8fde\u63a5\u6570\u636e\u5e93<\/span><br \/>\n<span class=\"token function\">docker<\/span> <span class=\"token builtin class-name\">exec<\/span> <span class=\"token parameter variable\">-it<\/span> opentenbase-coordinator <span class=\"token punctuation\">\\\\<\/span><br \/>\n  \/usr\/lib\/opentenbase\/bin\/psql <span class=\"token parameter variable\">-U<\/span> opentenbase <span class=\"token parameter variable\">-d<\/span> postgres<\/p>\n<p><span class=\"token comment\"># \u8fd0\u884c SQL<\/span><br \/>\nSELECT * FROM pgxc_node<span class=\"token punctuation\">;<\/span><\/p>\n<p>[\u5360\u4f4d\u7b26&#xff1a;\u6700\u7ec8\u6548\u679c\u5b8c\u6574\u622a\u56fe]<\/p>\n<hr \/>\n<h3>\u5341\u4e00\u3001\u603b\u7ed3<\/h3>\n<p>\u901a\u8fc7 Docker Compose&#xff0c;\u6211\u4eec\u5b9e\u73b0\u4e86&#xff1a;<\/p>\n<li>\u2705 \u90e8\u7f72\u65f6\u95f4\u4ece 2-3 \u5c0f\u65f6 \u2192 5 \u5206\u949f<\/li>\n<li>\u2705 \u914d\u7f6e\u6b65\u9aa4\u4ece 14 \u6b65 \u2192 1 \u547d\u4ee4<\/li>\n<li>\u2705 2G \u670d\u52a1\u5668\u5c31\u80fd\u8dd1\u901a<\/li>\n<li>\u2705 \u4e00\u952e\u542f\u52a8\u5b8c\u6574\u96c6\u7fa4&#xff08;GTM &#043; CN &#043; 2 DN&#xff09;<\/li>\n<li>\u2705 \u8d44\u6e90\u5360\u7528\u4ec5 350MB<\/li>\n<p>\u6838\u5fc3\u4f18\u52bf&#xff1a;<\/p>\n<ul>\n<li>\u4e0d\u9700\u8981\u7f16\u8bd1<\/li>\n<li>\u4e0d\u9700\u8981\u624b\u52a8\u914d\u7f6e<\/li>\n<li>\u81ea\u52a8\u5904\u7406\u8282\u70b9\u6ce8\u518c<\/li>\n<li>\u81ea\u52a8\u5904\u7406\u4f9d\u8d56<\/li>\n<li>\u73af\u5883\u9694\u79bb&#xff0c;\u6613\u4e8e\u6e05\u7406<\/li>\n<\/ul>\n<p>\u9002\u7528\u573a\u666f&#xff1a;<\/p>\n<ul>\n<li>\u5b66\u4e60\u7814\u7a76 OpenTenBase<\/li>\n<li>\u5feb\u901f\u642d\u5efa\u6d4b\u8bd5\u73af\u5883<\/li>\n<li>CI\/CD \u96c6\u6210\u6d4b\u8bd5<\/li>\n<li>\u6f14\u793a\u548c\u6559\u5b66<\/li>\n<\/ul>\n<p>\u9879\u76ee\u5730\u5740&#xff1a;<\/p>\n<ul>\n<li>GitHub: https:\/\/github.com\/muzimu217\/OpenTenBase-deb<\/li>\n<li>Docker Hub: https:\/\/hub.docker.com\/r\/opentenbase\/opentenbase<\/li>\n<\/ul>\n<hr \/>\n<p>\u5982\u679c\u4f60\u4e5f\u5728\u6298\u817e OpenTenBase&#xff0c;\u5e0c\u671b\u8fd9\u4e2a\u65b9\u6848\u80fd\u5e2e\u4f60\u8282\u7701\u65f6\u95f4&#xff01;<\/p>\n<p>\u6709\u95ee\u9898\u6b22\u8fce\u7559\u8a00\u4ea4\u6d41~<\/p>\n<hr \/>\n<p>\u4f5c\u8005&#xff1a;\u6298\u817e OpenTenBase \u7684\u5b66\u751f<br \/>\n\u9879\u76ee\u5730\u5740&#xff1a;<\/p>\n<ul>\n<li>GitHub: https:\/\/github.com\/muzimu217\/OpenTenBase-deb<\/li>\n<li>Docker Hub: https:\/\/hub.docker.com\/r\/opentenbase\/opentenbase<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u8a00<br \/>\n\u8bf4\u5b9e\u8bdd&#xff0c;\u6211\u5dee\u70b9\u88ab OpenTenBase \u7684\u90e8\u7f72\u903c\u75af\u4e86\u3002<br \/>\n\u4f5c\u4e3a\u4e00\u4e2a\u5b66\u751f&#xff0c;\u53ea\u6709\u4e00\u53f0 2G \u5185\u6838\u30011 \u6838 CPU \u7684\u817e\u8baf\u4e91\u670d\u52a1\u5668&#xff0c;\u60f3\u8981\u7814\u7a76\u56fd\u4ea7\u5206\u5e03\u5f0f\u6570\u636e\u5e93 OpenTenBase \u7684\u6e90\u7801\u548c\u67b6\u6784\u3002<br \/>\n\u7ed3\u679c\u53d1\u73b0&#xff1a;<br \/>\n\u5b98\u65b9\u90e8\u7f72\u6d41\u7a0b\u592a\u590d\u6742\u4e86&#xff01;<br \/>\n\u9700\u8981&#xff1a;<br \/>\n\u7f16\u8bd1 30-60 \u5206\u949f\u624b\u52a8\u914d\u7f6e 14 \u4e2a\u6b65\u9aa4\u5206\u522b\u521d\u59cb\u5316 GTM\u3001Coordinator\u3001Datanode\u624b\u52a8\u6ce8\u518c\u8282\u70b9\u5230 pgxc_node \u8868\u914d\u7f6e\u4e00\u5806\u7aef\u53e3<\/p>\n","protected":false},"author":2,"featured_media":97551,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[664,2441,100,351],"topic":[],"class_list":["post-97558","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-664","tag-2441","tag-100","tag-351"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u6211\u7528 2G \u670d\u52a1\u5668\u8dd1\u901a\u4e86 OpenTenBase\uff01\u5206\u5e03\u5f0f\u6570\u636e\u5e93 Docker \u5316\u90e8\u7f72\u5168\u8fc7\u7a0b - \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\/97558.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u6211\u7528 2G \u670d\u52a1\u5668\u8dd1\u901a\u4e86 OpenTenBase\uff01\u5206\u5e03\u5f0f\u6570\u636e\u5e93 Docker \u5316\u90e8\u7f72\u5168\u8fc7\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u524d\u8a00 \u8bf4\u5b9e\u8bdd&#xff0c;\u6211\u5dee\u70b9\u88ab OpenTenBase \u7684\u90e8\u7f72\u903c\u75af\u4e86\u3002 \u4f5c\u4e3a\u4e00\u4e2a\u5b66\u751f&#xff0c;\u53ea\u6709\u4e00\u53f0 2G \u5185\u6838\u30011 \u6838 CPU \u7684\u817e\u8baf\u4e91\u670d\u52a1\u5668&#xff0c;\u60f3\u8981\u7814\u7a76\u56fd\u4ea7\u5206\u5e03\u5f0f\u6570\u636e\u5e93 OpenTenBase \u7684\u6e90\u7801\u548c\u67b6\u6784\u3002 \u7ed3\u679c\u53d1\u73b0&#xff1a; \u5b98\u65b9\u90e8\u7f72\u6d41\u7a0b\u592a\u590d\u6742\u4e86&#xff01; \u9700\u8981&#xff1a; \u7f16\u8bd1 30-60 \u5206\u949f\u624b\u52a8\u914d\u7f6e 14 \u4e2a\u6b65\u9aa4\u5206\u522b\u521d\u59cb\u5316 GTM\u3001Coordinator\u3001Datanode\u624b\u52a8\u6ce8\u518c\u8282\u70b9\u5230 pgxc_node \u8868\u914d\u7f6e\u4e00\u5806\u7aef\u53e3\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/97558.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-29T11:17:36+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260829111728-6a92bfc805b11.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=\"10 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/97558.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/97558.html\",\"name\":\"\u6211\u7528 2G \u670d\u52a1\u5668\u8dd1\u901a\u4e86 OpenTenBase\uff01\u5206\u5e03\u5f0f\u6570\u636e\u5e93 Docker \u5316\u90e8\u7f72\u5168\u8fc7\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-08-29T11:17:36+00:00\",\"dateModified\":\"2026-08-29T11:17:36+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/97558.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/97558.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/97558.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u6211\u7528 2G \u670d\u52a1\u5668\u8dd1\u901a\u4e86 OpenTenBase\uff01\u5206\u5e03\u5f0f\u6570\u636e\u5e93 Docker \u5316\u90e8\u7f72\u5168\u8fc7\u7a0b\"}]},{\"@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":"\u6211\u7528 2G \u670d\u52a1\u5668\u8dd1\u901a\u4e86 OpenTenBase\uff01\u5206\u5e03\u5f0f\u6570\u636e\u5e93 Docker \u5316\u90e8\u7f72\u5168\u8fc7\u7a0b - \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\/97558.html","og_locale":"zh_CN","og_type":"article","og_title":"\u6211\u7528 2G \u670d\u52a1\u5668\u8dd1\u901a\u4e86 OpenTenBase\uff01\u5206\u5e03\u5f0f\u6570\u636e\u5e93 Docker \u5316\u90e8\u7f72\u5168\u8fc7\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u524d\u8a00 \u8bf4\u5b9e\u8bdd&#xff0c;\u6211\u5dee\u70b9\u88ab OpenTenBase \u7684\u90e8\u7f72\u903c\u75af\u4e86\u3002 \u4f5c\u4e3a\u4e00\u4e2a\u5b66\u751f&#xff0c;\u53ea\u6709\u4e00\u53f0 2G \u5185\u6838\u30011 \u6838 CPU \u7684\u817e\u8baf\u4e91\u670d\u52a1\u5668&#xff0c;\u60f3\u8981\u7814\u7a76\u56fd\u4ea7\u5206\u5e03\u5f0f\u6570\u636e\u5e93 OpenTenBase \u7684\u6e90\u7801\u548c\u67b6\u6784\u3002 \u7ed3\u679c\u53d1\u73b0&#xff1a; \u5b98\u65b9\u90e8\u7f72\u6d41\u7a0b\u592a\u590d\u6742\u4e86&#xff01; \u9700\u8981&#xff1a; \u7f16\u8bd1 30-60 \u5206\u949f\u624b\u52a8\u914d\u7f6e 14 \u4e2a\u6b65\u9aa4\u5206\u522b\u521d\u59cb\u5316 GTM\u3001Coordinator\u3001Datanode\u624b\u52a8\u6ce8\u518c\u8282\u70b9\u5230 pgxc_node \u8868\u914d\u7f6e\u4e00\u5806\u7aef\u53e3","og_url":"https:\/\/www.wsisp.com\/helps\/97558.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-08-29T11:17:36+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260829111728-6a92bfc805b11.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"10 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/97558.html","url":"https:\/\/www.wsisp.com\/helps\/97558.html","name":"\u6211\u7528 2G \u670d\u52a1\u5668\u8dd1\u901a\u4e86 OpenTenBase\uff01\u5206\u5e03\u5f0f\u6570\u636e\u5e93 Docker \u5316\u90e8\u7f72\u5168\u8fc7\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-08-29T11:17:36+00:00","dateModified":"2026-08-29T11:17:36+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/97558.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/97558.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/97558.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u6211\u7528 2G \u670d\u52a1\u5668\u8dd1\u901a\u4e86 OpenTenBase\uff01\u5206\u5e03\u5f0f\u6570\u636e\u5e93 Docker \u5316\u90e8\u7f72\u5168\u8fc7\u7a0b"}]},{"@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\/97558","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=97558"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/97558\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/97551"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=97558"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=97558"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=97558"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=97558"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}