{"id":84933,"date":"2026-07-26T20:41:59","date_gmt":"2026-07-26T12:41:59","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/84933.html"},"modified":"2026-07-26T20:41:59","modified_gmt":"2026-07-26T12:41:59","slug":"centos-stream-9%e6%9c%8d%e5%8a%a1%e5%99%a8docker%e9%83%a8%e7%bd%b2kaiwudb%e7%a4%be%e5%8c%ba%e7%89%88%ef%bc%9a%e4%bb%8e%e9%9b%b6%e5%88%b0%e8%b7%a8%e6%a8%a1%e6%9f%a5%e8%af%a2%e5%ae%9e%e6%88%98%e5%85%a8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/84933.html","title":{"rendered":"CentOS Stream 9\u670d\u52a1\u5668Docker\u90e8\u7f72KaiwuDB\u793e\u533a\u7248\uff1a\u4ece\u96f6\u5230\u8de8\u6a21\u67e5\u8be2\u5b9e\u6218\u5168\u8bb0\u5f55"},"content":{"rendered":"<\/p>\n<h4>\u76ee\u5f55<\/h4>\n<ul>\n<li>&#x1f680; CentOS Stream 9\u670d\u52a1\u5668Docker\u90e8\u7f72KaiwuDB\u793e\u533a\u7248&#xff1a;\u4ece\u96f6\u5230\u8de8\u6a21\u67e5\u8be2\u5b9e\u6218\u5168\u8bb0\u5f55<\/li>\n<li>\n<ul>\n<li>&#x1f6e0; \u4e00\u3001\u73af\u5883\u51c6\u5907<\/li>\n<li>\n<ul>\n<li>1.1 \u68c0\u67e5 CentOS \u7cfb\u7edf\u7248\u672c<\/li>\n<li>1.2 \u68c0\u67e5 Docker \u662f\u5426\u5df2\u5b89\u88c5<\/li>\n<li>1.3 \u68c0\u67e5\u7aef\u53e3\u662f\u5426\u88ab\u5360\u7528<\/li>\n<li>1.4 \u521b\u5efa\u90e8\u7f72\u76ee\u5f55<\/li>\n<\/ul>\n<\/li>\n<li>&#x1f680; \u4e8c\u3001Docker \u90e8\u7f72 KWDB<\/li>\n<li>\n<ul>\n<li>2.1 \u62c9\u53d6 KWDB \u955c\u50cf<\/li>\n<li>2.2 \u521b\u5efa docker-compose.yml \u6587\u4ef6<\/li>\n<li>2.4 \u9a8c\u8bc1\u5bb9\u5668\u8fd0\u884c\u72b6\u6001<\/li>\n<\/ul>\n<\/li>\n<li>&#x1f50c; \u4e09\u3001\u8fde\u63a5 KWDB \u9a8c\u8bc1<\/li>\n<li>\n<ul>\n<li>3.1 \u8fdb\u5165\u5bb9\u5668<\/li>\n<li>3.2 \u4f7f\u7528 kwbase CLI \u8fde\u63a5\u6570\u636e\u5e93<\/li>\n<li>3.3 \u67e5\u770b\u6570\u636e\u5e93\u7248\u672c<\/li>\n<\/ul>\n<\/li>\n<li>&#x1f525; \u56db\u3001\u6838\u5fc3\u5b9e\u6218&#xff1a;\u53cc\u6a21\u5efa\u8868\u4e0e\u8de8\u6a21\u67e5\u8be2<\/li>\n<li>\n<ul>\n<li>4.1 \u521b\u5efa\u5173\u7cfb\u6570\u636e\u5e93\u548c\u5173\u7cfb\u8868&#xff08;\u5b58\u50a8\u7535\u8868\u6863\u6848\u4fe1\u606f&#xff09;<\/li>\n<li>4.2 \u521b\u5efa\u65f6\u5e8f\u6570\u636e\u5e93\u548c\u65f6\u5e8f\u8868&#xff08;\u5b58\u50a8\u7535\u8868\u8bfb\u6570&#xff09;<\/li>\n<li>4.3 \u8de8\u6a21\u67e5\u8be2\u5b9e\u6218&#xff08;\u6838\u5fc3\u4eae\u70b9&#xff09;<\/li>\n<li>4.4 \u8fdb\u9636\u805a\u5408\u67e5\u8be2<\/li>\n<\/ul>\n<\/li>\n<li>&#x1f573; \u4e94\u3001\u8e29\u5751\u4e0e\u89e3\u51b3\u8bb0\u5f55<\/li>\n<li>\n<ul>\n<li>\u274c \u57511&#xff1a;\u542f\u52a8\u5bb9\u5668\u65f6\u62a5\u9519 &#034;bash: docker-compose: command not found&#034;<\/li>\n<li>\u274c \u57512&#xff1a;\u8de8\u6a21\u67e5\u8be2\u65f6\u63d0\u793a &#034;relation &#034;db1.accounts&#034; does not exist&#034;<\/li>\n<li>\u274c \u57513&#xff1a;\u65f6\u5e8f\u8868\u63d2\u5165\u6570\u636e\u65f6\u62a5\u9519 &#034;ERROR: unsupported input type BinaryOperator&#034;<\/li>\n<li>\u274c \u57514&#xff1a;\u5728 KWDB \u65f6\u5e8f\u8868\u4e2d&#xff0c;**\u6807\u7b7e\u5217\u4e0d\u652f\u6301 STRING \u7c7b\u578b**<\/li>\n<\/ul>\n<\/li>\n<li>&#x1f4dd; \u516d\u3001\u603b\u7ed3\u4e0e\u5fc3\u5f97<\/li>\n<li>\n<ul>\n<li>6.1 \u90e8\u7f72\u4f53\u9a8c<\/li>\n<li>6.2 KWDB \u6838\u5fc3\u80fd\u529b\u9a8c\u8bc1<\/li>\n<li>6.3 \u9002\u7528\u573a\u666f\u601d\u8003<\/li>\n<li>6.4 \u540e\u7eed\u8ba1\u5212<\/li>\n<\/ul>\n<\/li>\n<li>&#x1f4ce; \u4e03\u3001\u53c2\u8003\u8d44\u6599<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>&#x1f680; CentOS Stream 9\u670d\u52a1\u5668Docker\u90e8\u7f72KaiwuDB\u793e\u533a\u7248&#xff1a;\u4ece\u96f6\u5230\u8de8\u6a21\u67e5\u8be2\u5b9e\u6218\u5168\u8bb0\u5f55<\/h2>\n<p>\u6700\u8fd1\u5728\u7814\u7a76\u7269\u8054\u7f51\u6570\u636e\u5e93\u9009\u578b\u65f6&#xff0c;\u4e86\u89e3\u5230 KWDB \u662f\u4e00\u6b3e\u9762\u5411 AIoT \u573a\u666f\u7684\u5206\u5e03\u5f0f\u591a\u6a21\u6570\u636e\u5e93&#xff0c;\u652f\u6301\u5728\u540c\u4e00\u5b9e\u4f8b\u4e2d\u540c\u65f6\u5904\u7406\u65f6\u5e8f\u6570\u636e\u548c\u5173\u7cfb\u6570\u636e&#xff0c;\u5e76\u80fd\u8fdb\u884c\u8de8\u6a21\u67e5\u8be2 \u3002\u8fd9\u4e2a\u7279\u6027\u975e\u5e38\u5438\u5f15\u6211\u3002<\/p>\n<p>\u672c\u6b21\u5b9e\u64cd\u6211\u9009\u62e9\u4e86 CentOS Stream 9 \u4e91\u670d\u52a1\u5668&#xff0c;\u91c7\u7528 Docker \u65b9\u5f0f\u90e8\u7f72 KWDB&#xff0c;\u5e76\u57fa\u4e8e\u667a\u80fd\u7535\u8868\u573a\u666f&#xff0c;\u5b8c\u6574\u5b9e\u8df5\u4e86\u201c\u65f6\u5e8f\u8868&#043;\u5173\u7cfb\u8868\u201d\u7684\u521b\u5efa\u4e0e\u8de8\u6a21\u67e5\u8be2\u3002\u672c\u6587\u5c06\u8bb0\u5f55\u4ece\u73af\u5883\u51c6\u5907\u3001\u90e8\u7f72\u8e29\u5751\u5230\u5b9e\u6218\u5e94\u7528\u7684\u5168\u8fc7\u7a0b\u3002<\/p>\n<p>\u73af\u5883\u4fe1\u606f&#xff1a;<\/p>\n<ul>\n<li>\u64cd\u4f5c\u7cfb\u7edf&#xff1a;CentOS Stream 9 (x86_64)<\/li>\n<li>Docker \u7248\u672c&#xff1a;29.0&#043;<\/li>\n<li>KWDB \u7248\u672c&#xff1a;3.1.0 &#xff08;\u5b98\u65b9\u6700\u65b0\u7248&#xff09;<\/li>\n<li>\u670d\u52a1\u5668\u914d\u7f6e&#xff1a;16\u683832G<\/li>\n<\/ul>\n<h3>&#x1f6e0; \u4e00\u3001\u73af\u5883\u51c6\u5907<\/h3>\n<h4>1.1 \u68c0\u67e5 CentOS \u7cfb\u7edf\u7248\u672c<\/h4>\n<p><span class=\"token function\">cat<\/span> \/etc\/centos-release<\/p>\n<h4>1.2 \u68c0\u67e5 Docker \u662f\u5426\u5df2\u5b89\u88c5<\/h4>\n<p><span class=\"token function\">docker<\/span> <span class=\"token parameter variable\">&#8211;version<\/span><br \/>\n<span class=\"token function\">docker<\/span> compose version<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260726124156-6a660094a785e.png\" alt=\"image-20260227155127277\" \/><\/p>\n<h4>1.3 \u68c0\u67e5\u7aef\u53e3\u662f\u5426\u88ab\u5360\u7528<\/h4>\n<p>KWDB \u9ed8\u8ba4\u4f7f\u7528 8080&#xff08;Web\u754c\u9762&#xff09;\u548c 26257&#xff08;\u6570\u636e\u5e93\u670d\u52a1\u7aef\u53e3&#xff09;\u3002<\/p>\n<p><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\">8080<\/span><br \/>\n<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\">26257<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260726124156-6a660094b73df.png\" alt=\"image-20260227154949136\" \/><\/p>\n<p>\u5982\u6709\u5360\u7528&#xff0c;\u9700\u8981\u5148\u505c\u6b62\u76f8\u5e94\u8fdb\u7a0b\u6216\u4fee\u6539\u7aef\u53e3\u6620\u5c04\u3002<\/p>\n<h4>1.4 \u521b\u5efa\u90e8\u7f72\u76ee\u5f55<\/h4>\n<p><span class=\"token function\">mkdir<\/span> <span class=\"token parameter variable\">-p<\/span> ~\/kwdb-docker <span class=\"token operator\">&amp;&amp;<\/span> <span class=\"token builtin class-name\">cd<\/span> ~\/kwdb-docker<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260726124156-6a660094d5e7a.png\" alt=\"image-20260227154736570\" \/><\/p>\n<hr \/>\n<h3>&#x1f680; \u4e8c\u3001Docker \u90e8\u7f72 KWDB<\/h3>\n<p>&#xff08;\u5b98\u65b9\u63d0\u4f9b\u4e86\u4e24\u79cd Docker \u90e8\u7f72\u65b9\u5f0f&#xff0c;\u6211\u9009\u62e9\u4e86\u66f4\u6e05\u6670\u7684 docker-compose \u65b9\u5f0f&#xff09;<\/p>\n<h4>2.1 \u62c9\u53d6 KWDB \u955c\u50cf<\/h4>\n<p><span class=\"token function\">docker<\/span> pull registry.cn-hangzhou.aliyuncs.com\/kwdb\/kwdb:latest<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260726124156-6a660094e1bb1.png\" alt=\"image-20260227155332653\" \/><\/p>\n<h4>2.2 \u521b\u5efa docker-compose.yml \u6587\u4ef6<\/h4>\n<p><span class=\"token function\">vim<\/span> docker-compose.yml<\/p>\n<p>\u5199\u5165\u4ee5\u4e0b\u5185\u5bb9 &#xff1a;<\/p>\n<p><span class=\"token key atrule\">services<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">kaiwudb-container<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">image<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;registry.cn-hangzhou.aliyuncs.com\/kwdb\/kwdb:latest&#034;<\/span>  <span class=\"token comment\"># \u76f4\u63a5\u4f7f\u7528\u963f\u91cc\u4e91\u955c\u50cf<\/span><br \/>\n    <span class=\"token key atrule\">container_name<\/span><span class=\"token punctuation\">:<\/span> kaiwudb<span class=\"token punctuation\">&#8211;<\/span>experience<br \/>\n    <span class=\"token key atrule\">hostname<\/span><span class=\"token punctuation\">:<\/span> kaiwudb<span class=\"token punctuation\">&#8211;<\/span>experience<br \/>\n    <span class=\"token key atrule\">ports<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> 8080<span class=\"token punctuation\">:<\/span><span class=\"token number\">8080<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> 26257<span class=\"token punctuation\">:<\/span><span class=\"token number\">26257<\/span><br \/>\n    <span class=\"token key atrule\">ulimits<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token key atrule\">memlock<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token number\">-1<\/span><br \/>\n    <span class=\"token key atrule\">volumes<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> \/dev<span class=\"token punctuation\">:<\/span>\/dev<br \/>\n    <span class=\"token key atrule\">restart<\/span><span class=\"token punctuation\">:<\/span> on<span class=\"token punctuation\">&#8211;<\/span>failure<br \/>\n    <span class=\"token key atrule\">ipc<\/span><span class=\"token punctuation\">:<\/span> shareable<br \/>\n    <span class=\"token key atrule\">privileged<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token boolean important\">true<\/span><br \/>\n    <span class=\"token key atrule\">environment<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> LD_LIBRARY_PATH&#061;\/kaiwudb\/lib<br \/>\n    <span class=\"token key atrule\">tty<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token boolean important\">true<\/span><br \/>\n    <span class=\"token key atrule\">working_dir<\/span><span class=\"token punctuation\">:<\/span> \/kaiwudb\/bin<br \/>\n    <span class=\"token key atrule\">command<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> \/bin\/bash<br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> <span class=\"token punctuation\">&#8211;<\/span>c<br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> <span class=\"token punctuation\">|<\/span><span class=\"token scalar string\"><br \/>\n        .\/kwbase start-single-node &#8211;insecure &#8211;listen-addr&#061;0.0.0.0:26257 &#8211;advertise-addr&#061;222.*.*.130:26257 &#8211;http-addr&#061;0.0.0.0:8080 &#8211;store&#061;\/kaiwudb\/deploy\/kaiwudb<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260726124157-6a66009504dde.png\" alt=\"image-20260227155834442\" \/><\/p>\n<p>2.3 \u542f\u52a8\u5bb9\u5668<\/p>\n<p><span class=\"token function\">docker<\/span> compose up <span class=\"token parameter variable\">-d<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260726124157-6a66009533787.png\" alt=\"image-20260227155913828\" \/><\/p>\n<h4>2.4 \u9a8c\u8bc1\u5bb9\u5668\u8fd0\u884c\u72b6\u6001<\/h4>\n<p><span class=\"token function\">docker<\/span> <span class=\"token function\">ps<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260726124157-6a66009540960.png\" alt=\"image-20260227155928825\" \/><\/p>\n<hr \/>\n<h3>&#x1f50c; \u4e09\u3001\u8fde\u63a5 KWDB \u9a8c\u8bc1<\/h3>\n<h4>3.1 \u8fdb\u5165\u5bb9\u5668<\/h4>\n<p><span class=\"token function\">docker<\/span> <span class=\"token builtin class-name\">exec<\/span> <span class=\"token parameter variable\">-it<\/span> kaiwudb-experience \/bin\/bash<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260726124157-6a66009555e95.png\" alt=\"image-20260227155947909\" \/><\/p>\n<h4>3.2 \u4f7f\u7528 kwbase CLI \u8fde\u63a5\u6570\u636e\u5e93<\/h4>\n<p>.\/kwbase sql <span class=\"token parameter variable\">&#8211;insecure<\/span> <span class=\"token parameter variable\">&#8211;host<\/span><span class=\"token operator\">&#061;<\/span>localhost<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260726124157-6a66009561b06.png\" alt=\"image-20260227160009797\" \/><\/p>\n<h4>3.3 \u67e5\u770b\u6570\u636e\u5e93\u7248\u672c<\/h4>\n<p><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><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260726124157-6a660095781e8.png\" alt=\"image-20260227160028874\" \/><\/p>\n<hr \/>\n<h3>&#x1f525; \u56db\u3001\u6838\u5fc3\u5b9e\u6218&#xff1a;\u53cc\u6a21\u5efa\u8868\u4e0e\u8de8\u6a21\u67e5\u8be2<\/h3>\n<p>&#xff08;\u53c2\u8003\u5b98\u65b9\u6587\u6863\u548c\u793e\u533a\u5b9e\u8df5&#xff0c;\u6211\u6a21\u62df\u4e00\u4e2a\u667a\u80fd\u7535\u8868\u573a\u666f&#xff09;<\/p>\n<h4>4.1 \u521b\u5efa\u5173\u7cfb\u6570\u636e\u5e93\u548c\u5173\u7cfb\u8868&#xff08;\u5b58\u50a8\u7535\u8868\u6863\u6848\u4fe1\u606f&#xff09;<\/h4>\n<p><span class=\"token comment\">&#8212; \u521b\u5efa\u5173\u7cfb\u6570\u636e\u5e93<\/span><br \/>\n<span class=\"token keyword\">CREATE<\/span> <span class=\"token keyword\">DATABASE<\/span> db1<span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">&#8212; \u5207\u6362\u5230\u5173\u7cfb\u6570\u636e\u5e93<\/span><br \/>\n<span class=\"token keyword\">SET<\/span> <span class=\"token keyword\">DATABASE<\/span> <span class=\"token operator\">&#061;<\/span> db1<span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">&#8212; \u521b\u5efa\u5173\u7cfb\u8868&#xff1a;\u5b58\u50a8\u7535\u8868\u57fa\u7840\u4fe1\u606f<\/span><br \/>\n<span class=\"token keyword\">CREATE<\/span> <span class=\"token keyword\">TABLE<\/span> accounts <span class=\"token punctuation\">(<\/span><br \/>\n    meter_id STRING <span class=\"token keyword\">PRIMARY<\/span> <span class=\"token keyword\">KEY<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    location STRING<span class=\"token punctuation\">,<\/span><br \/>\n    customer_name STRING<span class=\"token punctuation\">,<\/span><br \/>\n    install_date <span class=\"token keyword\">DATE<\/span><br \/>\n<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">&#8212; \u63d2\u5165\u6d4b\u8bd5\u6570\u636e<\/span><br \/>\n<span class=\"token keyword\">INSERT<\/span> <span class=\"token keyword\">INTO<\/span> accounts <span class=\"token keyword\">VALUES<\/span><br \/>\n<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;M1001&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;\u5317\u4eac\u5e02\u671d\u9633\u533a&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;\u738b\u5148\u751f&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;2024-01-15&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;M1002&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;\u4e0a\u6d77\u5e02\u6d66\u4e1c\u65b0\u533a&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;\u674e\u5973\u58eb&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;2024-02-20&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;M1003&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;\u6df1\u5733\u5e02\u5357\u5c71\u533a&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;\u5f20\u5148\u751f&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;2024-03-10&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">&#8212; \u67e5\u8be2\u9a8c\u8bc1<\/span><br \/>\n<span class=\"token keyword\">SELECT<\/span> <span class=\"token operator\">*<\/span> <span class=\"token keyword\">FROM<\/span> accounts<span class=\"token punctuation\">;<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260726124157-6a66009585f6d.png\" alt=\"image-20260227160125806\" \/><\/p>\n<h4>4.2 \u521b\u5efa\u65f6\u5e8f\u6570\u636e\u5e93\u548c\u65f6\u5e8f\u8868&#xff08;\u5b58\u50a8\u7535\u8868\u8bfb\u6570&#xff09;<\/h4>\n<p><span class=\"token comment\">&#8212; \u521b\u5efa\u65f6\u5e8f\u6570\u636e\u5e93<\/span><br \/>\n<span class=\"token keyword\">CREATE<\/span> TS <span class=\"token keyword\">DATABASE<\/span> ts_db<span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">&#8212; \u5207\u6362\u5230\u65f6\u5e8f\u6570\u636e\u5e93<\/span><br \/>\n<span class=\"token keyword\">SET<\/span> <span class=\"token keyword\">DATABASE<\/span> <span class=\"token operator\">&#061;<\/span> ts_db<span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">&#8212; \u521b\u5efa\u65f6\u5e8f\u8868&#xff1a;\u5b58\u50a8\u5b9e\u65f6\u8bfb\u6570<\/span><br \/>\n<span class=\"token comment\">&#8212; \u6ce8\u610f&#xff1a;\u65f6\u5e8f\u8868\u9700\u8981\u6307\u5b9a\u65f6\u95f4\u6233\u5217\u548c\u6807\u7b7e\u5217 <\/span><br \/>\n<span class=\"token keyword\">CREATE<\/span> <span class=\"token keyword\">TABLE<\/span> readings <span class=\"token punctuation\">(<\/span><br \/>\n    ts <span class=\"token keyword\">TIMESTAMP<\/span> <span class=\"token operator\">NOT<\/span> <span class=\"token boolean\">NULL<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    voltage <span class=\"token keyword\">FLOAT<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token keyword\">current<\/span> <span class=\"token keyword\">FLOAT<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    power <span class=\"token keyword\">FLOAT<\/span><br \/>\n<span class=\"token punctuation\">)<\/span> TAGS <span class=\"token punctuation\">(<\/span><br \/>\n    meter_id <span class=\"token keyword\">VARCHAR<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">64<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">NOT<\/span> <span class=\"token boolean\">NULL<\/span>   <span class=\"token comment\">&#8212; \u6539\u4e3a VARCHAR&#xff0c;\u6307\u5b9a\u957f\u5ea6<\/span><br \/>\n<span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">PRIMARY<\/span> TAGS <span class=\"token punctuation\">(<\/span><br \/>\n    meter_id<br \/>\n<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">&#8212; \u63d2\u5165\u6a21\u62df\u65f6\u5e8f\u6570\u636e<\/span><br \/>\n<span class=\"token keyword\">INSERT<\/span> <span class=\"token keyword\">INTO<\/span> readings <span class=\"token keyword\">VALUES<\/span><br \/>\n<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;2026-02-27 14:30:00&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">220.5<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">5.2<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">1146.6<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;M1001&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;2026-02-27 14:31:00&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">221.3<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">6.1<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">1350.9<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;M1001&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;2026-02-27 14:30:00&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">219.8<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">4.8<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">1055.0<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;M1002&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;2026-02-27 14:31:00&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">220.1<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">7.2<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">1584.7<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;M1002&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;2026-02-27 14:30:00&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">221.0<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">3.9<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">861.9<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;M1003&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260726124157-6a6600959d622.png\" alt=\"image-20260227160619723\" \/><\/p>\n<h4>4.3 \u8de8\u6a21\u67e5\u8be2\u5b9e\u6218&#xff08;\u6838\u5fc3\u4eae\u70b9&#xff09;<\/h4>\n<p>\u573a\u666f\u9700\u6c42&#xff1a;\u67e5\u770b&#034;\u6bcf\u4e2a\u7528\u6237\u7684\u5b9e\u65f6\u7528\u7535\u60c5\u51b5&#xff0c;\u5e76\u663e\u793a\u7528\u6237\u59d3\u540d\u548c\u6240\u5728\u533a\u57df&#034;<\/p>\n<p><span class=\"token comment\">&#8212; \u8de8\u5e93\u8de8\u6a21\u67e5\u8be2&#xff1a;\u5173\u8054\u5173\u7cfb\u5e93\u7684 accounts \u8868\u548c\u65f6\u5e8f\u5e93\u7684 readings \u8868<\/span><br \/>\n<span class=\"token keyword\">SELECT<\/span><br \/>\n    a<span class=\"token punctuation\">.<\/span>customer_name<span class=\"token punctuation\">,<\/span><br \/>\n    a<span class=\"token punctuation\">.<\/span>location<span class=\"token punctuation\">,<\/span><br \/>\n    r<span class=\"token punctuation\">.<\/span>ts<span class=\"token punctuation\">,<\/span><br \/>\n    r<span class=\"token punctuation\">.<\/span>voltage<span class=\"token punctuation\">,<\/span><br \/>\n    r<span class=\"token punctuation\">.<\/span>power<br \/>\n<span class=\"token keyword\">FROM<\/span> ts_db<span class=\"token punctuation\">.<\/span>readings r<br \/>\n<span class=\"token keyword\">JOIN<\/span> db1<span class=\"token punctuation\">.<\/span>accounts a <span class=\"token keyword\">ON<\/span> r<span class=\"token punctuation\">.<\/span>meter_id <span class=\"token operator\">&#061;<\/span> a<span class=\"token punctuation\">.<\/span>meter_id<br \/>\n<span class=\"token keyword\">WHERE<\/span> r<span class=\"token punctuation\">.<\/span>ts <span class=\"token operator\">&gt;&#061;<\/span> <span class=\"token function\">now<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#8211;<\/span> <span class=\"token keyword\">interval<\/span> <span class=\"token string\">&#039;5 minutes&#039;<\/span><br \/>\n<span class=\"token keyword\">ORDER<\/span> <span class=\"token keyword\">BY<\/span> r<span class=\"token punctuation\">.<\/span>ts<span class=\"token punctuation\">;<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260726124157-6a660095ae1fb.png\" alt=\"image-20260227160649965\" \/><\/p>\n<p>\u7ed3\u679c\u5206\u6790&#xff1a;\u53ef\u4ee5\u770b\u5230&#xff0c;\u65f6\u5e8f\u8868\u7684\u5b9e\u65f6\u8bfb\u6570\u6210\u529f\u5173\u8054\u4e0a\u4e86\u5173\u7cfb\u8868\u7684\u7528\u6237\u4fe1\u606f&#xff0c;\u4e00\u6761SQL\u641e\u5b9a\u539f\u672c\u9700\u8981\u4e24\u5957\u6570\u636e\u5e93&#043;\u4ee3\u7801\u8054\u52a8\u7684\u590d\u6742\u64cd\u4f5c&#xff0c;\u8fd9\u5c31\u662f KWDB \u591a\u6a21\u878d\u5408\u7684\u4ef7\u503c\u6240\u5728&#xff01;<\/p>\n<h4>4.4 \u8fdb\u9636\u805a\u5408\u67e5\u8be2<\/h4>\n<p><span class=\"token comment\">&#8212; \u7edf\u8ba1\u6bcf\u4e2a\u7528\u6237\u6700\u8fd11\u5c0f\u65f6\u7684\u603b\u7528\u7535\u91cf<\/span><br \/>\n<span class=\"token keyword\">SELECT<\/span><br \/>\n    a<span class=\"token punctuation\">.<\/span>customer_name<span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token function\">SUM<\/span><span class=\"token punctuation\">(<\/span>r<span class=\"token punctuation\">.<\/span>power<span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">as<\/span> total_power<br \/>\n<span class=\"token keyword\">FROM<\/span> ts_db<span class=\"token punctuation\">.<\/span>readings r<br \/>\n<span class=\"token keyword\">JOIN<\/span> db1<span class=\"token punctuation\">.<\/span>accounts a <span class=\"token keyword\">ON<\/span> r<span class=\"token punctuation\">.<\/span>meter_id <span class=\"token operator\">&#061;<\/span> a<span class=\"token punctuation\">.<\/span>meter_id<br \/>\n<span class=\"token keyword\">WHERE<\/span> r<span class=\"token punctuation\">.<\/span>ts <span class=\"token operator\">&gt;&#061;<\/span> <span class=\"token function\">now<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#8211;<\/span> <span class=\"token keyword\">interval<\/span> <span class=\"token string\">&#039;1 hour&#039;<\/span><br \/>\n<span class=\"token keyword\">GROUP<\/span> <span class=\"token keyword\">BY<\/span> a<span class=\"token punctuation\">.<\/span>customer_name<span class=\"token punctuation\">;<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260726124157-6a660095c52a6.png\" alt=\"image-20260227160711997\" \/><\/p>\n<hr \/>\n<h3>&#x1f573; \u4e94\u3001\u8e29\u5751\u4e0e\u89e3\u51b3\u8bb0\u5f55<\/h3>\n<p>&#xff08;\u8fd9\u91cc\u4e00\u5b9a\u8981\u5199\u4f60\u5b9e\u9645\u9047\u5230\u7684\u95ee\u9898&#xff0c;\u8bc4\u59d4\u6700\u7231\u770b\u771f\u5b9e\u8e29\u5751&#xff09;<\/p>\n<h4>\u274c \u57511&#xff1a;\u542f\u52a8\u5bb9\u5668\u65f6\u62a5\u9519 \u201cbash: docker-compose: command not found\u201d<\/h4>\n<ul>\n<li>\u73b0\u8c61&#xff1a;\u6267\u884c docker-compose up -d \u63d0\u793abash: docker-compose: command not found<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260726124157-6a660095d725f.png\" alt=\"image-20260227161444697\" \/><\/p>\n<ul>\n<li>\n<p>\u539f\u56e0&#xff1a;\u7248\u672c\u95ee\u9898&#xff0c;\u5e94\u8be5\u4f7f\u7528docker compose up -d<\/p>\n<\/li>\n<li>\n<p>\u89e3\u51b3&#xff1a;<\/p>\n<p> <span class=\"token function\">docker<\/span> compose up <span class=\"token parameter variable\">-d<\/span>\n <\/li>\n<\/ul>\n<h4>\u274c \u57512&#xff1a;\u8de8\u6a21\u67e5\u8be2\u65f6\u63d0\u793a \u201crelation \u201cdb1.accounts\u201d does not exist\u201d<\/h4>\n<ul>\n<li>\u73b0\u8c61&#xff1a;\u6267\u884c JOIN \u67e5\u8be2\u65f6\u62a5\u9519\u8868\u4e0d\u5b58\u5728<\/li>\n<li>\u539f\u56e0&#xff1a;\u6ca1\u6709\u6307\u5b9a\u6570\u636e\u5e93\u540d\u79f0&#xff0c;KWDB \u9ed8\u8ba4\u5728\u5f53\u524d\u6570\u636e\u5e93\u627e\u8868<\/li>\n<li>\u89e3\u51b3&#xff1a;\u4f7f\u7528 \u6570\u636e\u5e93\u540d.\u8868\u540d \u7684\u5b8c\u6574\u5199\u6cd5&#xff0c;\u5982 db1.accounts<\/li>\n<\/ul>\n<h4>\u274c \u57513&#xff1a;\u65f6\u5e8f\u8868\u63d2\u5165\u6570\u636e\u65f6\u62a5\u9519 \u201cERROR: unsupported input type BinaryOperator\u201d<\/h4>\n<ul>\n<li>\u73b0\u8c61&#xff1a;ERROR: unsupported input type BinaryOperator<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260726124157-6a660095e34d4.png\" alt=\"image-20260227161025449\" \/><\/p>\n<ul>\n<li>\u539f\u56e0&#xff1a;\u539f\u56e0&#xff1a;\u5728 KWDB \u4e2d&#xff0c;\u4e0d\u652f\u6301 now() &#043; interval &#039;1 minute&#039; \u8fd9\u79cd\u4e8c\u5143\u8fd0\u7b97\u7b26\u5199\u6cd5\u3002\u6839\u636e\u5b98\u65b9\u6587\u6863&#xff0c;\u65f6\u95f4\u6233\u53ef\u4ee5\u4f7f\u7528 NOW() \u51fd\u6570&#xff0c;\u4f46\u4e0d\u652f\u6301\u8fd9\u79cd\u52a0\u6cd5\u8fd0\u7b97 \u3002<\/li>\n<li>\u89e3\u51b3&#xff1a;\u4f7f\u7528<\/li>\n<\/ul>\n<p><span class=\"token keyword\">INSERT<\/span> <span class=\"token keyword\">INTO<\/span> readings <span class=\"token keyword\">VALUES<\/span><br \/>\n<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;2026-02-27 14:30:00&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">220.5<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">5.2<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">1146.6<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;M1001&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;2026-02-27 14:31:00&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">221.3<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">6.1<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">1350.9<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;M1001&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;2026-02-27 14:30:00&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">219.8<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">4.8<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">1055.0<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;M1002&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;2026-02-27 14:31:00&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">220.1<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">7.2<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">1584.7<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;M1002&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;2026-02-27 14:30:00&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">221.0<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">3.9<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">861.9<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;M1003&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<h4>\u274c \u57514&#xff1a;\u5728 KWDB \u65f6\u5e8f\u8868\u4e2d&#xff0c;\u6807\u7b7e\u5217\u4e0d\u652f\u6301 STRING \u7c7b\u578b<\/h4>\n<p>\u73b0\u8c61<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260726124158-6a66009601e3c.png\" alt=\"image-20260227161048009\" \/><\/p>\n<p>\u539f\u56e0&#xff1a;\u5728 KWDB \u65f6\u5e8f\u8868\u4e2d&#xff0c;\u6807\u7b7e\u5217\u4e0d\u652f\u6301 STRING \u7c7b\u578b \u3002\u6839\u636e\u5b98\u65b9\u6587\u6863&#xff0c;\u65f6\u5e8f\u8868\u7684\u6807\u7b7e\u5217\u4e0d\u652f\u6301\u4ee5\u4e0b\u6570\u636e\u7c7b\u578b &#xff1a;<\/p>\n<ul>\n<li>TIMESTAMP \/ TIMESTAMPTZ&#xff08;\u65f6\u95f4\u7c7b\u578b&#xff09;<\/li>\n<li>NVARCHAR&#xff08;\u53ef\u53d8\u957f\u5ea6\u5b57\u7b26&#xff09;<\/li>\n<li>GEOMETRY&#xff08;\u51e0\u4f55\u7c7b\u578b&#xff09;<\/li>\n<\/ul>\n<p>\u89e3\u51b3: \u5c06 STRING \u6539\u4e3a VARCHAR<\/p>\n<p><span class=\"token keyword\">CREATE<\/span> <span class=\"token keyword\">TABLE<\/span> readings <span class=\"token punctuation\">(<\/span><br \/>\n    ts <span class=\"token keyword\">TIMESTAMP<\/span> <span class=\"token operator\">NOT<\/span> <span class=\"token boolean\">NULL<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    voltage <span class=\"token keyword\">FLOAT<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token keyword\">current<\/span> <span class=\"token keyword\">FLOAT<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    power <span class=\"token keyword\">FLOAT<\/span><br \/>\n<span class=\"token punctuation\">)<\/span> TAGS <span class=\"token punctuation\">(<\/span><br \/>\n    meter_id <span class=\"token keyword\">VARCHAR<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">64<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">NOT<\/span> <span class=\"token boolean\">NULL<\/span>   <span class=\"token comment\">&#8212; \u6539\u4e3a VARCHAR&#xff0c;\u6307\u5b9a\u957f\u5ea6<\/span><br \/>\n<span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">PRIMARY<\/span> TAGS <span class=\"token punctuation\">(<\/span><br \/>\n    meter_id<br \/>\n<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<hr \/>\n<h3>&#x1f4dd; \u516d\u3001\u603b\u7ed3\u4e0e\u5fc3\u5f97<\/h3>\n<h4>6.1 \u90e8\u7f72\u4f53\u9a8c<\/h4>\n<ul>\n<li>Docker \u65b9\u5f0f\u4fbf\u6377\u5ea6&#xff1a;\u2606\u2606\u2606\u2606\u2606&#xff08;15\u5206\u949f\u641e\u5b9a&#xff0c;\u6bd4\u88f8\u673a\u5b89\u88c5\u7701\u4e8b\u592a\u591a&#xff09;<\/li>\n<li>\u5b98\u65b9\u6587\u6863\u53cb\u597d\u5ea6&#xff1a;\u2606\u2606\u2606\u2606&#xff08;\u8d44\u6599\u9f50\u5168&#xff0c;\u4f46\u90e8\u5206\u6563\u843d\u5728\u4e0d\u540c\u5e73\u53f0&#xff09;<\/li>\n<\/ul>\n<h4>6.2 KWDB \u6838\u5fc3\u80fd\u529b\u9a8c\u8bc1<\/h4>\n<p>\u672c\u6b21\u5b9e\u64cd\u6210\u529f\u9a8c\u8bc1\u4e86 KWDB \u7684\u4e24\u5927\u6838\u5fc3\u80fd\u529b&#xff1a;<\/p>\n<li>\u591a\u6a21\u6570\u636e\u7edf\u4e00\u7ba1\u7406&#xff1a;\u540c\u4e00\u4e2a\u5b9e\u4f8b\u540c\u65f6\u5b58\u50a8\u5173\u7cfb\u6570\u636e\u548c\u65f6\u5e8f\u6570\u636e<\/li>\n<li>\u8de8\u6a21\u67e5\u8be2&#xff1a;\u901a\u8fc7 SQL \u76f4\u63a5\u5173\u8054\u5206\u6790\u4e24\u7c7b\u6570\u636e&#xff0c;\u65e0\u9700\u4e2d\u95f4\u4ef6\u62fc\u88c5<\/li>\n<h4>6.3 \u9002\u7528\u573a\u666f\u601d\u8003<\/h4>\n<p>\u7ed3\u5408\u5b98\u65b9\u4ecb\u7ecd&#xff0c;\u6211\u8ba4\u4e3a KWDB \u7279\u522b\u9002\u5408\u4ee5\u4e0b\u573a\u666f &#xff1a;<\/p>\n<ul>\n<li>\u5de5\u4e1a\u7269\u8054\u7f51&#xff1a;\u8bbe\u5907\u6863\u6848&#xff08;\u5173\u7cfb&#xff09;&#043; \u5b9e\u65f6\u76d1\u63a7\u6570\u636e&#xff08;\u65f6\u5e8f&#xff09;<\/li>\n<li>\u80fd\u6e90\u7535\u529b&#xff1a;\u7535\u8868\u6863\u6848 &#043; \u8bfb\u6570\u8bb0\u5f55<\/li>\n<li>\u8f66\u8054\u7f51&#xff1a;\u8f66\u8f86\u4fe1\u606f &#043; \u8f68\u8ff9\u6570\u636e<\/li>\n<\/ul>\n<h4>6.4 \u540e\u7eed\u8ba1\u5212<\/h4>\n<p>\u4e0b\u4e00\u6b65\u6253\u7b97\u7533\u8bf7\u8bd5\u7528 KAT&#xff08;KWDB \u667a\u80fd\u4f53\u5de5\u5177&#xff09; \u6216\u5c1d\u8bd5 Smart Meter Web \u53ef\u89c6\u5316\u9879\u76ee &#xff0c;\u505a\u66f4\u6df1\u5165\u7684\u5e94\u7528\u63a2\u7d22\u3002<\/p>\n<hr \/>\n<h3>&#x1f4ce; \u4e03\u3001\u53c2\u8003\u8d44\u6599<\/h3>\n<ul>\n<li>KWDB \u5b98\u65b9\u6587\u6863&#xff1a;https:\/\/www.kaiwudb.com\/docs<\/li>\n<li>KWDB Gitee \u4ed3\u5e93&#xff1a;https:\/\/gitee.com\/kwdb\/kwdb<\/li>\n<li>\u8de8\u6a21\u67e5\u8be2\u53c2\u8003&#xff1a;\u57fa\u4e8e Smart Meter Web&#xff0c;\u6df1\u5165\u5b9e\u8df5 KWDB \u8de8\u6a21\u67e5\u8be2<\/li>\n<li>Docker \u90e8\u7f72\u53c2\u8003&#xff1a;\u5728 CentOS \u4e91\u670d\u52a1\u4e2d\u901a\u8fc7 Docker \u5b89\u88c5 KWDB<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u76ee\u5f55&#x1f680; CentOS Stream 9\u670d\u52a1\u5668Docker\u90e8\u7f72KaiwuDB\u793e\u533a\u7248&#xff1a;\u4ece\u96f6\u5230\u8de8\u6a21\u67e5\u8be2\u5b9e\u6218\u5168\u8bb0\u5f55&#x1f6e0; \u4e00\u3001\u73af\u5883\u51c6\u59071.1 \u68c0\u67e5 CentOS \u7cfb\u7edf\u7248\u672c1.2 \u68c0\u67e5 Docker \u662f\u5426\u5df2\u5b89\u88c51.3 \u68c0\u67e5\u7aef\u53e3\u662f\u5426\u88ab\u5360\u75281.4 \u521b\u5efa\u90e8\u7f72\u76ee\u5f55&#x1f680; \u4e8c\u3001Docker \u90e8\u7f72 KWDB2.1 \u62c9\u53d6 KWDB \u955c\u50cf2.2 \u521b\u5efa docker-compose.yml \u6587\u4ef62.4 \u9a8c\u8bc1\u5bb9\u5668\u8fd0\u884c\u72b6\u6001&#x1f50c; \u4e09\u3001\u8fde\u63a5 K<\/p>\n","protected":false},"author":2,"featured_media":84916,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[59,27,43],"topic":[],"class_list":["post-84933","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-centos","tag-docker","tag-43"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>CentOS Stream 9\u670d\u52a1\u5668Docker\u90e8\u7f72KaiwuDB\u793e\u533a\u7248\uff1a\u4ece\u96f6\u5230\u8de8\u6a21\u67e5\u8be2\u5b9e\u6218\u5168\u8bb0\u5f55 - \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\/84933.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"CentOS Stream 9\u670d\u52a1\u5668Docker\u90e8\u7f72KaiwuDB\u793e\u533a\u7248\uff1a\u4ece\u96f6\u5230\u8de8\u6a21\u67e5\u8be2\u5b9e\u6218\u5168\u8bb0\u5f55 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u76ee\u5f55&#x1f680; CentOS Stream 9\u670d\u52a1\u5668Docker\u90e8\u7f72KaiwuDB\u793e\u533a\u7248&#xff1a;\u4ece\u96f6\u5230\u8de8\u6a21\u67e5\u8be2\u5b9e\u6218\u5168\u8bb0\u5f55&#x1f6e0; \u4e00\u3001\u73af\u5883\u51c6\u59071.1 \u68c0\u67e5 CentOS \u7cfb\u7edf\u7248\u672c1.2 \u68c0\u67e5 Docker \u662f\u5426\u5df2\u5b89\u88c51.3 \u68c0\u67e5\u7aef\u53e3\u662f\u5426\u88ab\u5360\u75281.4 \u521b\u5efa\u90e8\u7f72\u76ee\u5f55&#x1f680; \u4e8c\u3001Docker \u90e8\u7f72 KWDB2.1 \u62c9\u53d6 KWDB \u955c\u50cf2.2 \u521b\u5efa docker-compose.yml \u6587\u4ef62.4 \u9a8c\u8bc1\u5bb9\u5668\u8fd0\u884c\u72b6\u6001&#x1f50c; \u4e09\u3001\u8fde\u63a5 K\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/84933.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-26T12:41:59+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260726124156-6a660094a785e.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\/84933.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/84933.html\",\"name\":\"CentOS Stream 9\u670d\u52a1\u5668Docker\u90e8\u7f72KaiwuDB\u793e\u533a\u7248\uff1a\u4ece\u96f6\u5230\u8de8\u6a21\u67e5\u8be2\u5b9e\u6218\u5168\u8bb0\u5f55 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-07-26T12:41:59+00:00\",\"dateModified\":\"2026-07-26T12:41:59+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/84933.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/84933.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/84933.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"CentOS Stream 9\u670d\u52a1\u5668Docker\u90e8\u7f72KaiwuDB\u793e\u533a\u7248\uff1a\u4ece\u96f6\u5230\u8de8\u6a21\u67e5\u8be2\u5b9e\u6218\u5168\u8bb0\u5f55\"}]},{\"@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":"CentOS Stream 9\u670d\u52a1\u5668Docker\u90e8\u7f72KaiwuDB\u793e\u533a\u7248\uff1a\u4ece\u96f6\u5230\u8de8\u6a21\u67e5\u8be2\u5b9e\u6218\u5168\u8bb0\u5f55 - \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\/84933.html","og_locale":"zh_CN","og_type":"article","og_title":"CentOS Stream 9\u670d\u52a1\u5668Docker\u90e8\u7f72KaiwuDB\u793e\u533a\u7248\uff1a\u4ece\u96f6\u5230\u8de8\u6a21\u67e5\u8be2\u5b9e\u6218\u5168\u8bb0\u5f55 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u76ee\u5f55&#x1f680; CentOS Stream 9\u670d\u52a1\u5668Docker\u90e8\u7f72KaiwuDB\u793e\u533a\u7248&#xff1a;\u4ece\u96f6\u5230\u8de8\u6a21\u67e5\u8be2\u5b9e\u6218\u5168\u8bb0\u5f55&#x1f6e0; \u4e00\u3001\u73af\u5883\u51c6\u59071.1 \u68c0\u67e5 CentOS \u7cfb\u7edf\u7248\u672c1.2 \u68c0\u67e5 Docker \u662f\u5426\u5df2\u5b89\u88c51.3 \u68c0\u67e5\u7aef\u53e3\u662f\u5426\u88ab\u5360\u75281.4 \u521b\u5efa\u90e8\u7f72\u76ee\u5f55&#x1f680; \u4e8c\u3001Docker \u90e8\u7f72 KWDB2.1 \u62c9\u53d6 KWDB \u955c\u50cf2.2 \u521b\u5efa docker-compose.yml \u6587\u4ef62.4 \u9a8c\u8bc1\u5bb9\u5668\u8fd0\u884c\u72b6\u6001&#x1f50c; \u4e09\u3001\u8fde\u63a5 K","og_url":"https:\/\/www.wsisp.com\/helps\/84933.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-07-26T12:41:59+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260726124156-6a660094a785e.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\/84933.html","url":"https:\/\/www.wsisp.com\/helps\/84933.html","name":"CentOS Stream 9\u670d\u52a1\u5668Docker\u90e8\u7f72KaiwuDB\u793e\u533a\u7248\uff1a\u4ece\u96f6\u5230\u8de8\u6a21\u67e5\u8be2\u5b9e\u6218\u5168\u8bb0\u5f55 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-07-26T12:41:59+00:00","dateModified":"2026-07-26T12:41:59+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/84933.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/84933.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/84933.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"CentOS Stream 9\u670d\u52a1\u5668Docker\u90e8\u7f72KaiwuDB\u793e\u533a\u7248\uff1a\u4ece\u96f6\u5230\u8de8\u6a21\u67e5\u8be2\u5b9e\u6218\u5168\u8bb0\u5f55"}]},{"@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\/84933","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=84933"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/84933\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/84916"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=84933"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=84933"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=84933"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=84933"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}