Zookeeper 分布式部署
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Zookeeper 分布式部署相关的知识,希望对你有一定的参考价值。
/opt/app/zookeeper-3.4.5/conf/zoo.cfg tickTime=2000 initLimit=10 syncLimit=5 dataDir=/opt/app/zookeeper-3.4.5/data/zkData clientPort=2181 server.1=hadoop-senior.huiyunltd.com:2888:3888 server.2=hadoop-senior02.huiyunltd.com:2888:3888 server.3=hadoop-senior03.huiyunltd.com:2888:3888 [[email protected] ~]$ touch /opt/app/zookeeper-3.4.5/data/zkData/myid [[email protected] ~]$ echo "1" >> /opt/app/zookeeper-3.4.5/data/zkData/myid [[email protected] ~]$ scp -r /opt/app/zookeeper-3.4.5/ [email protected]:/opt/app/ [[email protected] ~]$ scp -r /opt/app/zookeeper-3.4.5/ [email protected]:/opt/app/ [[email protected] ~]$ vim /opt/app/zookeeper-3.4.5/data/zkData/myid 2 [[email protected] ~]$ vim /opt/app/zookeeper-3.4.5/data/zkData/myid 3 [email protected] ~]$ /opt/app/zookeeper-3.4.5/bin/zkServer.sh start [[email protected] ~]$ /opt/app/zookeeper-3.4.5/bin/zkServer.sh start [[email protected] ~]$ /opt/app/zookeeper-3.4.5/bin/zkServer.sh start [[email protected] ~]$ /opt/app/zookeeper-3.4.5/bin/zkServer.sh status [[email protected] ~]$ /opt/app/zookeeper-3.4.5/bin/zkServer.sh status [[email protected] ~]$ /opt/app/zookeeper-3.4.5/bin/zkServer.sh status
Mode: follower
Mode: leader
以上是关于Zookeeper 分布式部署的主要内容,如果未能解决你的问题,请参考以下文章