In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to deploy zookeeper clusters. The editor thinks it is very practical, so I share it with you. I hope you can get something after reading this article. Let's take a look at it with the editor.
Zookeeper
Provide coordination services for distributed programs. As a third party to manage some shared data, zookeeper itself is very reliable and provides services in a distributed cluster (immortal).
The main functions of zookeeper:
1. Keep the data submitted by the client (a very small amount of data): each piece of data forms a tree structure between zookeeper called a znode,znode.
Zookeeper cluster installation:
1. Decompression
2. Conf modifies vim zoo.cfg
TickTime=2000 initLimit=10 syncLimit=5 dataDir=/data/solrcloud/zookeeper/data clientPort=2181 server.1=x01:2888:3888 server.2=x02:2888:3888 server.3=x03:2888:3888
3. Create / data/solrcloud/zookeeper/data directory
Mkdir / data/solrcloud/zookeeper/data
4. Create a file myid file with the number of server
Echo 1 > myid
4. Copy zookeeper to the other two machines (x02 and x03)
On the respective machines, modify the contents of myid, such as x02 to echo 2 > myid
5. Start
Start the zookeeper on the three machines
. / zkServer.sh start
6. Check whether the zookeeper of the three machines is a cluster.
. / zkServer.sh status/** result JMX enabled by defaultUsing config: / data/solrcloud/zookeeper/bin/../conf/zoo.cfgMode: leader * / / indicates that this zookeeper is the role of leader
7. Connect to the server for testing
. / zkCli.sh / / connect native / / create a file [zk: localhost:2181 (CONNECTED) 2] create / zooktest 80Created / zooktest// View directory [zk: localhost:2181 (CONNECTED) 3] ls / [zooktest] / / View the contents of the file [zk: localhost:2181 (CONNECTED) 4] get / zooktest80cZxid = 0x220000086actime = Fri Sep 02 17:12:40 CST 2016mZxid = 0x220000086amtime = Fri Sep 02 17:12:40 CST 2016pZxid = 0x220000086acversion = 0dataVersion = 0ephemeralOwner = 0x0dataLength = 2numChildren = 0pm / Modify the contents of the file [zk: localhost:2181 (CONNECTED) 5] set / zooktest90 [zk: localhost:2181 (CONNECTED) 6] get / zooktest90cZxid = 0x220000086actime = Fri Sep 02 17:12:40 CST 2016mZxid = 0x220000086bmtime = Fri Sep 02 17:18:09 CST 2016pZxid = 0x220000086acversion = 0dataVersion = 1aclVersion = 0x0dataLength = 2numChildren = 0 is how to deploy zookeeper clusters The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.