Tutorial on building a zookeeper server on Windows

Tutorial on building a zookeeper server on Windows

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!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • Detailed explanation of zookeeper python interface example
  • Introduction to the viper configuration framework supports zookeeper reading and monitoring
  • Zookeeper unauthorized access test problem
  • Implementation of Docker to build Zookeeper&Kafka cluster
  • Tutorial diagram of building a Hadoop high-availability cluster based on ZooKeeper
  • Netty + ZooKeeper implements simple service registration and discovery
  • Zookeeper connection timeout problem and solution to connection rejection
  • Python implements distributed service code analysis through zookeeper

<<:  Detailed explanation of the JVM series memory model

>>:  MySQL 8.0.14 installation and configuration method graphic tutorial (general)

Recommend

Summary of basic knowledge and operations of MySQL database

This article uses examples to explain the basic k...

Docker+nextcloud to build a personal cloud storage system

1. Docker installation and startup yum install ep...

How does MySQL achieve master-slave synchronization?

Master-slave synchronization, also called master-...

Global call implementation of Vue2.x Picker on mobile terminal

Table of contents What is the Picker component Pr...

Method and introduction of table index definition in MySQL

Overview An index is a table of correspondence be...

The difference and usage of distinct and row_number() over() in SQL

1 Introduction When we write SQL statements to op...

Example of how to achieve ceiling effect using WeChat applet

Table of contents 1. Implementation 2. Problems 3...

Vue implementation example using Google Recaptcha verification

In our recent project, we need to use Google robo...

Pure JS method to export table to excel

html <div > <button type="button&qu...

How to add a disk in Vmware: Expand the disk

This article describes how to add or expand a dis...

How to remove the blue box that appears when the image is used as a hyperlink

I recently used Dreamweaver to make a product pres...

Mysql timeline data to obtain the first three data of the same day

Create table data CREATE TABLE `praise_info` ( `i...

Pure CSS to achieve the list pull-down effect in the page

You may often see the following effect: That’s ri...

How to hide the version number and web page cache time in Nginx

Nginx optimization---hiding version number and we...

Scary Halloween Linux Commands

Even though it's not Halloween, it's wort...