blob: 499acf5d18a9bd30ea680fb62e67bb0fb2f27db3 [file] [log] [blame]
(window.webpackJsonp=window.webpackJsonp||[]).push([[72],{642:function(e,s,t){"use strict";t.r(s);var a=t(70),r=Object(a.a)({},(function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h2",{attrs:{id:"prerequisite"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#prerequisite"}},[e._v("#")]),e._v(" Prerequisite")]),e._v(" "),t("p",[e._v("Note: Please install MinGW or WSL or git bash if you are using Windows.")]),e._v(" "),t("h2",{attrs:{id:"example-of-distributed-scaffolding-for-3-nodes-and-3-replicas"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#example-of-distributed-scaffolding-for-3-nodes-and-3-replicas"}},[e._v("#")]),e._v(" Example of distributed scaffolding for 3 nodes and 3 replicas")]),e._v(" "),t("p",[e._v("Suppose we need to deploy the distributed IoTDB on three physical nodes, A, B, and C, whose public network IP is a_public_IP, b_public_IP, and c_public_IP, and private network IP is a_private_IP, b_private_IP, and c_private_IP.\nNote: If there is no public network IP or private network IP, both can be set to the same, just need to ensure that the client can access the server.")]),e._v(" "),t("p",[e._v("The operation steps are as follows:")]),e._v(" "),t("ol",[t("li",[e._v("Use 'mvn clean package -pl cluster -am -DskipTests' to compile the distributed module or directly go into the "),t("a",{attrs:{href:"https://iotdb.apache.org/Download/",target:"_blank",rel:"noopener noreferrer"}},[e._v("website"),t("OutboundLink")],1),e._v(" to download the latest version.")]),e._v(" "),t("li",[e._v("Make sure ports 6567, 6667, 9003, 9004, 40010, 40011 and 31999 are open on all three nodes.")]),e._v(" "),t("li",[e._v("Send the package to all servers.")]),e._v(" "),t("li",[e._v('Configure all nodes\' seed_nodes in conf/iotdb-cluster.properties as "A_private_ip:9003,B_private_ip:9003,C_private_ip:9003"')]),e._v(" "),t("li",[e._v("Configure the internal_ip in conf/iotdb-cluster.properties to be the private_ip of each node.")]),e._v(" "),t("li",[e._v("Configure the default_replica_num in conf/iotdb-cluster.properties to be 3.")]),e._v(" "),t("li",[e._v("Configure rpc_address in conf/iotdb-engine.properties to be the public_ip of each node.")]),e._v(" "),t("li",[e._v("Run sh sbin/start-node.sh on each of the three nodes (or run in the background).")])]),e._v(" "),t("h2",{attrs:{id:"example-of-distributed-scaffolding-for-1-node-and-1-replica"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#example-of-distributed-scaffolding-for-1-node-and-1-replica"}},[e._v("#")]),e._v(" Example of distributed scaffolding for 1 node and 1 replica")]),e._v(" "),t("h3",{attrs:{id:"compile-from-source-code"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#compile-from-source-code"}},[e._v("#")]),e._v(" Compile from source code:")]),e._v(" "),t("div",{staticClass:"language- line-numbers-mode"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("mvn clean package -DskipTests\nchmod -R 777 ./cluster/target/\nnohup ./cluster/target/iotdb-cluster-0.13.0-SNAPSHOT/sbin/start-node.sh >/dev/null 2>&1 &\n")])]),e._v(" "),t("div",{staticClass:"line-numbers-wrapper"},[t("span",{staticClass:"line-number"},[e._v("1")]),t("br"),t("span",{staticClass:"line-number"},[e._v("2")]),t("br"),t("span",{staticClass:"line-number"},[e._v("3")]),t("br")])]),t("h3",{attrs:{id:"use-the-official-website-release-version"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#use-the-official-website-release-version"}},[e._v("#")]),e._v(" Use the official website release version:")]),e._v(" "),t("div",{staticClass:"language- line-numbers-mode"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("curl -O https://mirrors.bfsu.edu.cn/apache/iotdb/0.12.0/apache-iotdb-0.12.0-cluster-bin.zip\nunzip apache-iotdb-0.12.0-cluster-bin.zip\ncd apache-iotdb-0.12.0-cluster-bin\nsed -i -e 's/^seed_nodes=127.0.0.1:9003,127.0.0.1:9005,127.0.0.1:9007$/seed_nodes=127.0.0.1:9003/g' conf/iotdb-cluster.properties\nsed -i -e 's/^default_replica_num=3$/default_replica_num=1/g' conf/iotdb-cluster.properties\nnohup ./sbin/start-node.sh >/dev/null 2>&1 &\n")])]),e._v(" "),t("div",{staticClass:"line-numbers-wrapper"},[t("span",{staticClass:"line-number"},[e._v("1")]),t("br"),t("span",{staticClass:"line-number"},[e._v("2")]),t("br"),t("span",{staticClass:"line-number"},[e._v("3")]),t("br"),t("span",{staticClass:"line-number"},[e._v("4")]),t("br"),t("span",{staticClass:"line-number"},[e._v("5")]),t("br"),t("span",{staticClass:"line-number"},[e._v("6")]),t("br")])]),t("h2",{attrs:{id:"example-of-distributed-scaffolding-for-3-nodes-and-1-replica-on-a-single-machine"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#example-of-distributed-scaffolding-for-3-nodes-and-1-replica-on-a-single-machine"}},[e._v("#")]),e._v(" Example of distributed scaffolding for 3 nodes and 1 replica on a single machine")]),e._v(" "),t("h3",{attrs:{id:"compile-from-source-code-2"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#compile-from-source-code-2"}},[e._v("#")]),e._v(" Compile from source code:")]),e._v(" "),t("div",{staticClass:"language- line-numbers-mode"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("mvn clean package -DskipTests\nchmod -R 777 ./cluster/target/\nnohup ./cluster/target/iotdb-cluster-0.13.0-SNAPSHOT/sbin/start-node.sh ./cluster/target/test-classes/node1conf/ >/dev/null 2>&1 &\nnohup ./cluster/target/iotdb-cluster-0.13.0-SNAPSHOT/sbin/start-node.sh ./cluster/target/test-classes/node2conf/ >/dev/null 2>&1 &\nnohup ./cluster/target/iotdb-cluster-0.13.0-SNAPSHOT/sbin/start-node.sh ./cluster/target/test-classes/node3conf/ >/dev/null 2>&1 &\n")])]),e._v(" "),t("div",{staticClass:"line-numbers-wrapper"},[t("span",{staticClass:"line-number"},[e._v("1")]),t("br"),t("span",{staticClass:"line-number"},[e._v("2")]),t("br"),t("span",{staticClass:"line-number"},[e._v("3")]),t("br"),t("span",{staticClass:"line-number"},[e._v("4")]),t("br"),t("span",{staticClass:"line-number"},[e._v("5")]),t("br")])]),t("h3",{attrs:{id:"use-the-official-website-release-version-2"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#use-the-official-website-release-version-2"}},[e._v("#")]),e._v(" Use the official website release version:")]),e._v(" "),t("p",[e._v("You can refer to the above example, but starting multiple instances on a single machine requires handling port and file directory conflicts.")])])}),[],!1,null,null,null);s.default=r.exports}}]);