Zookeeper cluster setup (Windows)

Source: Internet
Author: User

First step: Unzip the zookeeper-3.4.5.tar.gz to the D:\solrCloud directory and rename it to zookeeper-1.

Step Two: Change the zoo_sample.cfg in the D:\solrCloud\ zookeeper-1\conf\ directory to zoo.cfg . and write the following configuration parameters:

ticktime=2000
initlimit=10
Synclimit=5
Datadir=d:/solrcloud/zookeeper-1/data
Datalogdir=d:/solrcloud/zookeeper-1/datalog
clientport=2181
server.1=127.0.0.1:2881:3881
server.2=127.0.0.1:2882:3882
server.3=127.0.0.1:2883:3883

and create the corresponding data and datalog directories according to the configuration . If you do not create a directory, it does not start correctly.

Create a file in the data directory myID ( no suffix required ), write a number in the myid file 1 and save the exit.

step three: Putzookeeper-1Copy 2 copies , respectively named zookeeper-2,zookeeper-3. Then modify eachzookeeper-*the conf directory under the zoo.cfg datadir and datalogdir and clientport. Modify the scenario as follows:


DataDir

Datalogdir

ClientPort

Zookeeper-1

d:/solrcloud/ Zookeeper-1/data

D:/solrcloud/zookeeper-1/datalog

2181

Zookeeper-2

D:/solrcloud/zookeeper-2/data

D://solrcloud/zookeeper-2/datalog

2182

Zookeeper-3

d:/solrcloud/ Zookeeper-3/data

D:/solrcloud/zookeeper-3/datalog

2183


and modify the contents of the myID file in each data directory . zookeeper-1is 1, zookeeper-2is 2, zookeeper-3is 3 .

Fourth Step: Start three Zookeeper . and verify that the configuration is successful. directory structure and startup directory such as :

Note: When connecting the first, there is exception information, no tube, and so on are connected together there is no exception.

Enter the cmd command, enter : netstat-ano|findstr 2181 to see if the port is enabled

This article is from the "codingorthinking" blog, make sure to keep this source http://metebee.blog.51cto.com/8650444/1730280

Zookeeper cluster setup (Windows)

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.