Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The tutorial of building zookeeper server in windows system

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Installation & configuration

Many image download addresses are provided on the official website of apache, and then find the corresponding version.

Download address:

Http://mirrors.cnnic.cn/apache/zookeeper/zookeeper-3.4.14/zookeeper-3.4.14.tar.gz

Install under Windows

Extract the downloaded zookeeper files to the specified directory

C:\ ZK\ zookeeper-3.4.14 >

Add a zoo.cfg under the modified conf

The contents are as follows:

# The number of milliseconds of each tick heartbeat interval millisecond each tickTime=2000# The number of ticks that the initial# synchronization phase can takeinitLimit=10# The number of ticks that can pass between# sending a request and getting anacknowledgementsyncLimit=5# the directory where the snapshot isstored. / / Mirror data location dataDir=C:\\ ZK\\ data\\ zookeeper# log location dataLogDir=C:\\ ZK\\ logs\\ zookeeper# the port at which the clients willconnect client connection port clientPort=2181

Note: if there is an error in startup and indicates that there is an error in the cfg file, you can replace it with the content in zoo_sample.cfg.

Go to the bin directory and start zkServer.cmd, where a java process will be started

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 to run and check

C:\ ZK\ zookeeper-3.4.14\ bin > zkCli.cmd-server 127.0.0.1 purl 2181

At this time, zookeeper has been successfully installed.

Refer to the official documentation:

Http://zookeeper.apache.org/doc/trunk/zookeeperStarted.html

Posts referring to stand-alone mode, cluster and pseudo-cluster

Http://sqcjy111.iteye.com/blog/1741320

When running through a pseudo-cluster on a machine, you can modify the zkServer.cmd file to add it.

Set ZOOCFG=..\ conf\ zoo1.cfg line, save as zkServer-1.cmd

If there are more than one, and so on

It also needs to be in the corresponding

C:\\ ZK\\ data\\ zookeeper\ 1

C:\\ ZK\\ data\\ zookeeper\ 2

C:\\ ZK\\ data\\ zookeeper\ 3

Create a text file named myid, and the content is server in the corresponding zoo.cfg. Post-digit

Summary

The above is the tutorial of building zookeeper server in windows system introduced by Xiaobian. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply you in time. Thank you very much for your support to the website!

If you think this article is helpful to you, you are welcome to reprint it, please indicate the source, thank you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report