In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-11-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
The editor will share with you how to build a zookeeper cluster. I hope you will get something after reading this article. Let's discuss it together.
1 set up the cluster of zookeeper
1.1 zookeeper cluster requires at least 3 nodes (hadoop0,hadoop1,hadoop2) (Chapter 27 hadoop cluster construction), and the number is odd, and the time between nodes should be synchronized.
1.2 copy zookeeper.tar.gz on hadoop0, extract, rename, and set environment variables.
(1) copy zookeeper-3.4.tar.gz to the / usr/local directory, and then enter it
(2) execute the command tar-zxvf zookeeper-3.4.tar.gz to decompress
(3) rename mv zookeeper-3.4 zookeeper
1.3 enter zookeeper's conf directory on hadoop0
Mv zoo_sample.cfg zoo.cfg
1.4 go to the / usr/local/zookeeper/conf directory on hadoop0 and edit the file zoo.cfg
Change dataDir=/tmp/zookeeper to data=/usr/local/zookeeper/data
Add the following three lines:
Server.0=hadoop0:2888:3888
Server.1=hadoop1:2888:3888
Server.2=hadoop2:2888:3888
Create a folder on hadoop0 and execute the command mkdir-p / usr/local/zookeeper/data
1.5 under the data directory of hadoop0, create the file myid with a content of 0
Copy the zookeeper folder and / etc/profile on hadoop0 to the hadoop1,hadoop2 node.
1.7 execute source / etc/profile on hadoop1 and change the value of myid to 1
Execute source / etc/profile on hadoop2 and change the value of myid to 2
1.8 ssh to three nodes and execute the command zkServer.sh start on the three nodes
1. 9 Verification: execute jps on each node and find that one more java process is QuorumPeerMain.
After reading this article, I believe you have a certain understanding of "how to build a zookeeper cluster". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.