Zookeeper cluster build, take three on the ubuntu virtual machine as an example

First please refer to https://blog.csdn.net/caofengtao1314/article/details/105118047 to  solve starting a zookeeper, and then build and start three zookeeper

 

① The downloaded zookeeper, after decompression, copy three zookeeper directories

    cp -rf zookeerp.xx  zookeeper01

    cp -rf zookeerp.xx  zookeeper02

    cp -rf zookeerp.xx  zookeeper03

②Enter zookeeper01 / conf / directory and modify zoo.cfg

    

③Enter zookeeper02 / conf / directory and modify zoo.cfg

④Enter zookeeper02 / conf / directory and modify zoo.cfg

⑤Enter the zookeeper01 / bin directory

   Execute ./zkServer.sh start According to theory, zookeeper01 should enter the looking state, but through zkServer.sh status, there is indeed no connection, you can ignore this problem

⑥Enter the zookeeper02 / bin directory

   Run ./zkServer.sh start

   zkServer.sh status View Enter the leader

⑦Enter the zookeeper03 / bin directory

   Run ./zkServer.sh start

   zkServer.sh status View Enter follower status

⑧Enter the zookeeper01 / bin directory

   zkServer.sh status View Enter follower status

78 original articles published · 32 praised · 120,000 views

Guess you like

Origin blog.csdn.net/caofengtao1314/article/details/105121152