zk windows download and install

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https: //blog.csdn.net/ring300/article/details/80446918
official website to download

Apache ZooKeeper enter the official website to download, https: //zookeeper.apache.org/releases.html

 

Here we choose zookeeper-3.4.12 version download

 

 

 

Baidu network disk download

Link: https: //pan.baidu.com/s/1HOEcfGpg7CqAm28cOhGzuA Password: ap4n

installation

The zookeeper-3.4.12.tar.gz downloaded to extract the installation directory can be used

The zoo_sample.cfg files in the conf directory, copy, rename zoo.cfg

Zoo.cfg modify the configuration file, the dataDir = / tmp / zookeeper zookeeper modified installation directory where the data folder (the need to install an empty directory create a new folder and log data folder), and then adding adding a data log configuration, as in FIG.

 

 

tickTime: This is the time between Zookeeper as a server or a client and a server to maintain the heartbeat intervals, that is, each time tickTime will send a heartbeat.
How much time can stand up to this configuration item is used to configure Zookeeper accept client (here the client is not connected to the user client server Zookeeper, Zookeeper but a cluster of servers connected to the Leader of the Follower server) initialize the connection: initLimit heartbeat number of intervals. When you have more than 10 heartbeat time (that is, tickTime) the length Zookeeper server has not received client-side return information, it indicates that the client connection fails. The total length of time is 10 * 2000 = 20 sec
syncLimit: sending messages between the configuration item identifier Leader and Follower, request and response time length, the length of the longest number tickTime not exceed, the total length of time is 5 * 2000 = 10 seconds
dataDir: Zookeeper name suggests is to save the data directory, by default, the log file Zookeeper write data is also stored in this directory.
clientPort: This port is the port the client server connection Zookeeper, Zookeeper listens to this port, interview the client's request.
Start zookeeper, determine whether the installation was successful, double-click the file in the run zkServer.cmd bin directory can be

 

 

Check the service is started, you can view through the command netstat -ano whether there clientPort port number you configured in monitoring services;

It may be determined whether to start by double-clicking the implementation of zkCli.cmd success.

connection succeeded:

Connection failed:

 

 

----------------
Disclaimer: This article is the original article CSDN bloggers "Monica300", and follow CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement. .
Original link: https: //blog.csdn.net/ring300/article/details/80446918

Guess you like

Origin www.cnblogs.com/liuwei00125/p/11610229.html