Zookeeper cluster set up

Source: Internet
Author: User
Keywords Execute then install
Tags aliyun apache automatic communication configuration directory etc html

& http: //www.aliyun.com/zixun/aggregation/37954.html "> Zookeeper is an Apache open source project, very common in the cluster management.Its cluster is also very simple to build, only need a simple configuration, Each node in the cluster will complete its own communication, automatically select Leader and so on.

More about zookeeper information and principles, you can refer to this post: ZooKeeper principle and make

Zookeeper stand-alone mode is more simple: In Ubuntu system, just need to perform sudo apt-get install zookeeper installation, and then to the installation directory to find the zkServer.sh script, execute ./zkServer.sh start to start zookeeper stand-alone mode, through The directory where zookeeper is installed this way is usually / usr / share / zookeeper /. By running zkServer.sh status you can see the running status of zookeeper, here is the stand-alone mode, it will display:

If it is on other Linux systems (CentOS), execute:

This directory has a zoo_sample.cfg file is provided by the official example of the configuration, the implementation of:

Copy a sample configuration, renamed zoo.cfg, start zookeeper:

Let us try to build zookeeper cluster, due to limited machines, I used to build a pseudo-cluster on a machine to build the cluster. zookeeper The number of officially recommended cluster nodes is odd, so here we are ready to build a cluster of three nodes. And then extract the downloaded zookeeper file to each directory: At the same time change the directory name:

Then enter the zookeeper directory of each node to create the data directory and the logs directory respectively:

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.