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

Nginx access control and parameter tuning methods

Nginx global variables There are many global vari...

Summary of solutions for MySQL not supporting group by

I downloaded and installed the latest version of ...

How to build SFTP server and image server on Linux cloud server

First of all, you can understand the difference b...

How to modify the master-slave replication options in MySQL online

Preface: The most commonly used architecture of M...

How to configure Basic Auth login authentication in Nginx

Sometimes we build a file server through nginx, w...

Example code for implementing a text marquee with CSS3

Background Here's what happened, Luzhu accide...

Implementation of positioning CSS child elements relative to parent elements

Solution Add position:relative to the parent elem...

Detailed introduction to deploying k8s cluster on centos7 system

Table of contents 1 Version and planning 1.1 Vers...

How to use less in WeChat applet (optimal method)

Preface I am used to writing less/sass, but now I...

Convert psd cut image to div+css format

PSD to div css web page cutting example Step 1: F...

Detailed process of using nginx to build a webdav file server in Ubuntu

Install nginx Note that you must install nginx-fu...

MySQL FAQ series: How to avoid a sudden increase in the size of the ibdata1 file

0. Introduction What is the ibdata1 file? ibdata1...

VMware vCenter 6.7 installation process (graphic tutorial)

background I originally wanted to download a 6.7 ...