Installation & Configuration The official website of Apache provides many mirror download addresses, and then find the corresponding version Download address: http://mirrors.cnnic.cn/apache/zookeeper/zookeeper-3.4.14/zookeeper-3.4.14.tar.gz Installation on Windows Unzip the downloaded zookeeper file to the specified directory C:\ZK\zookeeper-3.4.14> Modify conf and add a zoo.cfg The content is as follows: # The number of milliseconds of each tick heartbeat interval milliseconds each tickTime = 2000 # The number of ticks that the initial # synchronization phase can take initLimit=10 # The number of ticks that can pass between # sending a request and getting an acknowledgement syncLimit=5 # the directory where the snapshot isstored. //Mirror data locationdataDir=C:\\ZK\\data\\zookeeper #Log location dataLogDir=C:\\ZK\\logs\\zookeeper # the port at which the clients will connect clientPort=2181 Note: If there is an error message when starting up, indicating that there is an error in the cfg file, you can replace it with the content in zoo_sample.cfg Enter the bin directory and start zkServer.cmd. This script will start a java process. C:\ZK\zookeeper-3.4.14>cd bin C:\ZK\zookeeper-3.4.14\bin> C:\ZK\zookeeper-3.4.14\bin >zkServer.cmd After startup, jps can see the process of QuorumPeerMain C:\ZK\zookeeper-3.4.14\bin >jps Start the client and run it to check C:\ZK\zookeeper-3.4.14\bin>zkCli.cmd -server 127.0.0.1:2181 At this time, zookeeper has been installed successfully. Refer to the official documentation: http://zookeeper.apache.org/doc/trunk/zookeeperStarted.html Refer to the posts on stand-alone mode, cluster and pseudo-cluster http://sqcjy111.iteye.com/blog/1741320 When running on a single machine through a pseudo cluster, you can modify the zkServer.cmd file and add Save the line set ZOOCFG=..\conf\zoo1.cfg as zkServer-1.cmd If there are multiple, you can do the same It is also necessary to C:\\ZK\\data\\zookeeper\\1, C:\\ZK\\data\\zookeeper\\2, C:\\ZK\\data\\zookeeper\\3 Create a text file named myid, and its content should be the number after server. in zoo.cfg. Summarize The above is the tutorial on how to build a zookeeper server on a windows system. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: Detailed explanation of the JVM series memory model
>>: MySQL 8.0.14 installation and configuration method graphic tutorial (general)
This article uses examples to explain the basic k...
1. Docker installation and startup yum install ep...
Master-slave synchronization, also called master-...
Table of contents What is the Picker component Pr...
Overview An index is a table of correspondence be...
1 Introduction When we write SQL statements to op...
Table of contents 1. Implementation 2. Problems 3...
In our recent project, we need to use Google robo...
html <div > <button type="button&qu...
This article describes how to add or expand a dis...
I recently used Dreamweaver to make a product pres...
Create table data CREATE TABLE `praise_info` ( `i...
You may often see the following effect: That’s ri...
Nginx optimization---hiding version number and we...
Even though it's not Halloween, it's wort...