一、准备3台机器,IP地址依次为IP1,IP2,IP3,找一个目录下建立文件夹如下:
./data/confignode
./logs/confignode
./data/datanode
./logs/datanode
二、在当前目录下建立docker-compose.yml文件,3台都要
1、第一台(为主节点的)
version: "3"
services:
iotdb-confignode:
image: apache/iotdb:1.1.0-confignode
restart: always
container_name: iotdb-confignode
environment:
- cn_internal_address=IP1
- cn_target_config_node_list=IP1:10710
- schema_replication_factor=3
- cn_internal_port=10710
- cn_consensus_port=10720
- schema_region_consensus_protocol_class=org.apache.iotdb.consensus.ratis.RatisConsensus
- config_node_consensus_protocol_class=org.apache.iotdb.consensus.ratis.RatisConsensus
- data_replication_factor=3
- data_region_consensus_protocol_class=org.apache.iotdb.consensus.iot.IoTConsensus
volumes:
- ./data/confignode:/iotdb/data
- ./logs/confignode:/iotdb/logs
network_mode: "host"
iotdb-datanode:
image: apache/iotdb:1.1.0-datanode
restart: always
container_name: iotdb-datanode
environment:
- dn_rpc_address=IP1
- dn_internal_address=IP1
- dn_target_config_node_list=IP1:10710
- data_replication_factor=3
- dn_rpc_port=6667
- dn_mpp_data_exchange_port=10740
- dn_schema_region_consensus_port=10750
- dn_data_region_consensus_port=10760
- data_region_consensus_protocol_class=org.apache.iotdb.consensus.iot.IoTConsensus
- schema_replication_factor=3
- schema_region_consensus_protocol_class=org.apache.iotdb.consensus.ratis.RatisConsensus
- config_node_consensus_protocol_class=org.apache.iotdb.consensus.ratis.RatisConsensus
volumes:
- ./data/datanode:/iotdb/data/
- ./logs/datanode:/iotdb/logs/
network_mode: "host"
2、第二台机器
version: "3"
services:
iotdb-confignode:
image: apache/iotdb:1.1.0-confignode
restart: always
container_name: iotdb-confignode
environment:
- cn_internal_address=IP2
- cn_target_config_node_list=IP2:10710
- schema_replication_factor=3
- cn_internal_port=10710
- cn_consensus_port=10720
- schema_region_consensus_protocol_class=org.apache.iotdb.consensus.ratis.RatisConsensus
- config_node_consensus_protocol_class=org.apache.iotdb.consensus.ratis.RatisConsensus
- data_replication_factor=3
- data_region_consensus_protocol_class=org.apache.iotdb.consensus.iot.IoTConsensus
volumes:
- ./data/confignode:/iotdb/data
- ./logs/confignode:/iotdb/logs
network_mode: "host"
iotdb-datanode:
im服务器托管网age: apache/iotdb:1.1.0-datanode
restart: always
container_name: iotdb-datanode
environment:
- dn_rpc_address=IP2
- dn_internal_address=IP2
- dn_target_config_node_list=IP1:10710
- data_replication_factor=3
- dn_rpc_port=6667
- dn_mpp_data_exchange_port=10740
- dn_schema_region_consensus_port=10750
- dn_data_region_consensus_port=10760
- data_region_consensus_protocol_class=org.apache.iotdb.consensus.iot.IoTConsensus
- schema_replication_factor=3
- schema_region_consensus_protocol_class=org.apache.iotdb.consensus.ratis.RatisConsensus
- config_node_consensus_protocol_class=org.apache.iotdb.consensus.ratis.RatisConsensus
volumes:
- ./data/datanode:/iotdb/data/
- ./logs/datanode:/iotdb/logs/
network_mode: "host"
3、第三台机器
version: "3"
services:
iotdb-confignode:
image: apache/iotdb:1.1.0-confignode
restart: always
container_name: 服务器托管网iotdb-confignode
environment:
- cn_internal_address=IP3
- cn_target_config_node_list=IP3:10710
- schema_replication_factor=3
- cn_internal_port=10710
- cn_consensus_port=10720
- schema_region_consensus_protocol_class=org.apache.iotdb.consensus.ratis.RatisConsensus
- config_node_consensus_protocol_class=org.apache.iotdb.consensus.ratis.RatisConsensus
- data_replication_factor=3
- data_region_consensus_protocol_class=org.apache.iotdb.consensus.iot.IoTConsensus
volumes:
- ./data/confignode:/iotdb/data
- ./logs/confignode:/iotdb/logs
network_mode: "host"
iotdb-datanode:
image: apache/iotdb:1.1.0-datanode
restart: always
container_name: iotdb-datanode
environment:
- dn_rpc_address=IP3
- dn_internal_address=IP3
- dn_target_config_node_list=IP1:10710
- data_replication_factor=3
- dn_rpc_port=6667
- dn_mpp_data_exchange_port=10740
- dn_schema_region_consensus_port=10750
- dn_data_region_consensus_port=10760
- data_region_consensus_protocol_class=org.apache.iotdb.consensus.iot.IoTConsensus
- schema_replication_factor=3
- schema_region_consensus_protocol_class=org.apache.iotdb.consensus.ratis.RatisConsensus
- config_node_consensus_protocol_class=org.apache.iotdb.consensus.ratis.RatisConsensus
volumes:
- ./data/datanode:/iotdb/data/
- ./logs/datanode:/iotdb/logs/
network_mode: "host"
三、分别运行docker-compose.yml文件
docker-compose up -d
服务器托管,北京服务器托管,服务器租用 http://www.fwqtg.net
交友小程序 1. 我的基本信息 2. 我的人脉 2.1 我的关注 2.2 我的粉丝 3. 我的视频 4. 我的相册 特别注意:由于小程序分包限制2M以内,所以要注意图片和视频的处理。 1. 我的基本信息 数据库表: 我的基本信息 我的登录退出记录 我的登录状态…