赞
踩
本文使用三个服务器来做集群搭建,IP如下:
nodeName | IP |
---|---|
node1 | 10.10.210.96 |
node2 | 10.10.210.97 |
node3 | 10.10.210.98 |
- - zookeeper
- - config
- - zoo.cfg
- - docker-compose.yml
- dataDir=/data
- dataLogDir=/datalog
- tickTime=2000
- initLimit=5
- syncLimit=2
- clientPort:2181
- server.1=127.0.0.1:2888:3888
- server.2=10.10.210.97:2888:3888
- server.3=10.10.210.98:2888:3888
- version: '3'
- services:
- zookeeper:
- image: zookeeper:3.7.0
- restart: always
- hostname: zookeeper-node-1
- container_name: zookeeper
- ports:
- - 2181:2181
- - 2888:2888
- - 3888:3888
- - 8080:8080
- volumes:
- - ./data:/data
- - ./datalog:/datalog
- - ./config/zoo.cfg:/conf/zoo.cfg
- environment:
- ZOO_MY_ID: 1
- - zookeeper
- - config
- - zoo.cfg
- - docker-compose.yml
- dataDir=/data
- dataLogDir=/datalog
- tickTime=2000
- initLimit=5
- syncLimit=2
- clientPort:2181
- server.1=10.10.210.96:2888:3888
- server.2=127.0.0.1:2888:3888
- server.3=10.10.210.98:2888:3888
- version: '3'
- services:
- zookeeper:
- image: zookeeper:3.7.0
- restart: always
- hostna
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。