Zookeeper installation and startup of pseudo-clusters under windows

Source: Internet
Author: User
Tags zookeeper

Install under Windows

Extract the downloaded zookeeper files to the specified directory

E:\Program\zookeeper-3.4.6

Modify conf under Add Zoo1.cfg,zoo2.cfg,zoo3.cfg

# the number of milliseconds of each tickticktime=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 an acknowledgementsyncLimit=5#  The directory where the snapshot is stored.# do not use /tmp  for storage, /tmp here is just # example sakes.datadir=/program/ zk_data/1# the port at which the clients will connectclientport=2181#  the maximum number of client connections.# increase this if  you need to handle more clients#maxclientcnxns=60## be sure to  read the maintenance section of the # administrator guide before turning on  autopurge.## http://zookeeper.apache.org/doc/current/zookeeperadmin.html#sc_maintenance## the  Number of snapshots to retain in datadir#autopurge.snapretaincount=3# purge  task interval in hours# Set to  "0"  to disable auto  purge feature#autopurge.purgeinterval=1server.1=127.0.0.1:2887:3887server.2=127.0.0.1:2888:3888server.3= 127.0.0.1:2889:3889

Corresponds to three instances:

ClientPort three files for 2181,2182,2183

DataDir three files for /program/zk_data/1,/program/zk_data/2,/program/zk_data/3

within three DataDir, create a myID file with content corresponding to


Copy zkserver.cmd for zkserver1.cmd,zkserver2.cmd,zkserver3.cmd

modify cmd, add set zoocfg=. \conf\zoo1.cfg, three cmd files correspond to their respective CFG files, for example:

Setlocalcall "%~dp0zkenv.cmd" set Zoomain=org.apache.zookeeper.server.quorum.quorumpeermainset ZOOCFG=. \conf\zoo1.cfgecho Onjava "-dzookeeper.log.dir=%zoo_log_dir%" "-dzookeeper.root.logger=%zoo_log4j_prop%"-CP "% classpath% "%zoomain%"%zoocfg% "%*endlocal

Start three cmd, which will complete the communication between several nodes

With JPS, you will see three startup Java Master processes



Zookeeper installation and startup of pseudo-clusters under windows

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.