美文网首页
Docker安装zookeeper集群

Docker安装zookeeper集群

作者: soane1983 | 来源:发表于2018-11-26 15:28 被阅读0次

    1. 

    docker run -d -p 2181:2181 -p 2888:2888 -p 3888:3888 --name zk1 --restart always -v /app/zookeeper/volume/data:/data -v /app/volume/zookeeper/volume/datalog:/datalog -e "TZ=Asia/Shanghai" -e "ZOO_MY_ID=1" -e "ZOO_SERVERS=server.1=0.0.0.0:2888:3888 server.2=10.21.14.165:2888:3888 server.3=10.21.14.166:2888:3888" zookeeper:latest

    2. 

    docker run -d -p 2181:2181 -p 2888:2888 -p 3888:3888 --name zk2 --restart always -v /app/zookeeper/volume/data:/data -v /app/zookeeper/volume/datalog:/datalog -e "TZ=Asia/Shanghai" -e "ZOO_MY_ID=2" -e "ZOO_SERVERS=server.1=10.21.14.164:2888:3888 server.2=0.0.0.0:2888:3888 server.3=10.21.14.166:2888:3888" zookeeper:latest

    3. 

    docker run -d -p 2181:2181 -p 2888:2888 -p 3888:3888 --name zk3 --restart always -v /app/zookeeper/volume/data:/data -v /app/zookeeper/volume/datalog:/datalog -e "TZ=Asia/Shanghai" -e "ZOO_MY_ID=3" -e "ZOO_SERVERS=server.1=10.21.14.164:2888:3888 server.2=10.21.14.165:2888:3888 server.3=0.0.0.0:2888:3888" zookeeper:latest

    相关文章

      网友评论

          本文标题:Docker安装zookeeper集群

          本文链接:https://www.haomeiwen.com/subject/jxubqqtx.html