First of all, zookeeper official website address: http://zookeeper.apache.org/ Download address: http://mirrors.shu.edu.cn/apache/zookeeper/stable/
This article is downloaded and used with zookeeper-3.4.10 version
1: Download and unzip
I downloaded my E drive and then unzipped it to the root directory of the E drive, as shown in the figure below:
2: Modify the configuration file
Go to the "E:\zookeeper-3.4.10\conf" folder, modify the "zoo_sample.cfg" file to "zoo.cfg" file, open it, and edit it as follows:
Simple parsing of the configuration file 1. tickTime: This time is the time interval between Zookeeper servers or between clients and servers to maintain a heartbeat, that is, a heartbeat will be sent every tickTime time. 2. dataDir: As the name suggests, it is the directory where Zookeeper stores data, and by default, Zookeeper also saves the log files that write data in this directory. 3. dataLogDir: As the name suggests, it is the directory where Zookeeper stores log files 4. clientPort: This port is the port where the client connects to the Zookeeper server, and Zookeeper will listen to this port and accept the client's access request.
3: Run the startup program
Go to the "E:\zookeeper-3.4.10\bin" folder, then,Starting the zkServer.cmd under the cmd command is not just clicking to run!A Java process is started in this script.
4: Inspection
Under the cmd command, run the following command to see the QuorumPeerMain process:
Or telnet 127.0.0.1 2181 to try and find that the port is passable!
At this point, the installation is complete!
|