Zookeeper Cluster construction

Source: Internet
Author: User

1: Perform these operations on the 192.168.80.200 server and upload the zookeeper-3.4.5.tar.gz file to the/usr/local directory on the server
2: Unzip: TAR-ZXVF zookeeper-3.4.5.tar.gz
3: Rename: MV zookeeper-3.4.5 zookeeper
4:CD zookeeper/conf
5: Modify the configuration file name: MV Zoo_sample.cfg zoo.cfg
6:vi zoo.cfg
Modifying datadir:/usr/local/zookeeper/data in a configuration file
Add the following configuration:
server.0=192.168.80.200:2888:3888
server.1=192.168.80.201:2888:3888
server.2=192.168.80.202:2888:3888

7:CD.
8: Create directory mkdir data
9: Create file VI myID in the data directory, save the number of the current node in it
Note: The number saved on the 192.168.80.200 server is 0
10:cd/usr/local
11: Copy the Zookeeper directory on the 170 server to the other two nodes
SCP-RQ Zookeeper 192.168.80.201:/usr/local
SCP-RQ Zookeeper 192.168.80.202:/usr/local

12: Connect to 192.168.80.201,cd/usr/local/zookeeper/data modify myID in the number 1
13: Connect to 192.168.80.202,cd/usr/local/zookeeper/data modify myID in the number 2


14: Start the Zookeeper service above the three nodes
Execute command in/usr/local/zookeeper directory on 200: bin/zkserver.sh start
Execute command in/usr/local/zookeeper directory on 201: bin/zkserver.sh Start
Execute command in/usr/local/zookeeper directory on 202: bin/zkserver.sh start

15: Finally, each node is executed JPS Verify that the process starts normally.

Zookeeper Cluster construction

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.