Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Detailed installation tutorial for zookeeper

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "the detailed installation tutorial of zookeeper". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn the detailed installation tutorial of zookeeper.

1. Install the decompression package 1. Pre-installation preparation

1. Install JDK.

two。 Download a stable version of ZooKeeper, unzip it and cd it to a directory.

two。 Configuration modification 1. Modify zoo.cfg

To start ZooKeeper, you need a configuration file, and the zoo_sample.cfg under the path zookeeper-3.4.10/conf is changed to zoo.cfg. Modify the content:

The settings of this directory vary from person to person, dataDir=/Users/huanchu/Documents/Software/zookeeper-3.4.13/zkData2. Create the zkData folder mkdir mkdir zkData3. Operate zookeeper1. Start zookeeper./bin/zkServer.sh start2. Check to see if the process starts huanchu-mbp:zookeeper-3.4.13 huanchu$ jps-l 2469 sun.tools.jps.Jps2461 org.apache.zookeeper.server.quorum.QuorumPeerMain3. Check the status huanchu-mbp:zookeeper-3.4.13 huanchu$. / bin/zkServer.sh statusZooKeeper JMX enabled by defaultUsing config: / Users/huanchu/Documents/Software/zookeeper-3.4.13/bin/../conf/zoo.cfgMode: standalone4. Start the client. / bin/zkCli.sh-server 127.0.0.1 purl 21815. Exit the client quit6. Stop zookeeper./bin/zkServer.sh stop II, docker installation 1. Get zookeeper image docker pull zookeeper2. Start Zookeeper server instance docker run-- name zk01-p 2181 name zk01-- restart always-d zookeeper III. Interpretation of configuration parameters

1. TickTime = 2000: number of heartbeats in communication, heartbeat time between Zookeeper server and client, basic time used by Zookeeper in milliseconds, time interval for maintaining heartbeat between servers or between client and server, that is, a heartbeat is sent in milliseconds for each tickTime time. It is used for the heartbeat mechanism and sets the minimum session timeout to twice the heartbeat time. (the minimum timeout for session is 2*tickTime)

2. InitLimit = 10:LF initial communication time limit the maximum number of heartbeats (number of tickTime) that can be tolerated during the initial connection between the Follower follower server and the Leader leader server in the cluster, which is used to limit the time limit for the Zookeeper server in the cluster to connect to the Leader.

3. SyncLimit = the maximum response time unit between Leader and Follower in the 5:LF synchronous communication time limit cluster. If the response exceeds syncLimit * tickTime,Leader, Follwer is considered dead. Delete Follwer from the server list.

4. DataDir: data file directory + data persistence path is mainly used to save data in Zookeeper.

5. ClientPort = 2181: the client connection port listens on the port to which the client connects.

At this point, I believe you have a deeper understanding of the "detailed installation tutorial of zookeeper". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

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.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report