Windows installation zookeeper-Standalone mode

Source: Internet
Author: User

    • Zookeeper:http://zookeeper.apache.org/releases.html#download this time 3.4. Version 9 is used
    • Prerequisites: Please install JDK
    • Installation:
    1. Create the installation directory and unzip the downloaded zookeeper-3.4.9.tar.gz compressed package
    2. Windows startup script in Bin directory Zkserver.cmd
    3. Before starting, modify the configuration file, Zookeeper configuration file in the Conf directory, this directory has zoo_sample.cfg and log4j.properties, you need to rename Zoo_sample.cfg zoo.cfg, because Zookeeper will find this file as the default profile at startup, and the configuration file entry is as follows:
# The number of milliseconds of each tickticktime=2000# the number of ticks, the initial # synchronization phase can T akeinitlimit=10# the number of ticks so can pass between # Sending a request and getting an acknowledgementsynclimit=5# The directory where the snapshot is stored.# does not use/tmp for storage,/tmp here is just # example Sakes.datadir=d:/wor k/emm_windows/zookeeper-3.4.9/data# the port at which the clients would connectclientport=2181# the maximum number of Clien T connections.# increase this if you need to handle more clients#maxclientcnxns=60## is sure to read the maintenance secti On 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=1

The meanings:

Ticktime: This time is the time interval between the Zookeeper server or between the client and the server to maintain the heartbeat, that is, each ticktime time sends a heartbeat. Initlimit: This configuration item is used to configure the Zookeeper accept client (the client here is not the client that connects the Zookeeper server, but the Leader that is connected to Follower in the Zookeeper server cluster) Server) The maximum number of heartbeat intervals that can be tolerated when a connection is initialized. The client connection failed when the Zookeeper server has not received the return information of the client after 10 heartbeats (that is, ticktime) length. The total length of time is 5*2000=10 seconds Synclimit: This configuration item identifies the message sent between Leader and Follower, the length of the request and response time, the maximum length of time to Ticktime, and the total length of time is 2*2000=4 Seconds DataDir: As the name implies is Zookeeper to save the data directory, by default, Zookeeper will write the data log file is also stored in this directory. ClientPort: This port is the port that the client connects to the Zookeeper server, Zookeeper listens to the port and accepts the client's access request.

4. After the configuration is complete, the Zkserver.cmd boot in the dual-machine bin directory

5. Check if the service is started, you can check the Netstat–ano command to see if there is a ClientPort port number you configured in the Listening service

Windows installation zookeeper-Standalone mode

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.