Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Installation steps for zookeeper cluster

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "the installation steps of zookeeper cluster". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn the "zookeeper cluster installation steps" bar!

Installation steps:

Be sure to install environments such as JDK before this

1. Install and configure zooekeeper cluster (on cluster5)

1.1 decompression

Tar-zxvf zookeeper-3.4.5.tar.gz-C / cluster/

1.2 modify configuration

Cd / cluster/zookeeper-3.4.5/conf/

Cp zoo_sample.cfg zoo.cfg

Vim zoo.cfg

Modify: dataDir=/cluster/zookeeper-3.4.5/tmp

At the end, add:

Server.1=cluster5:2888:3888

Server.2=cluster6:2888:3888

Server.3=cluster7:2888:3888

Save exit

Then create a tmp folder

Mkdir / cluster/zookeeper-3.4.5/tmp

Create another empty file

Touch / cluster/zookeeper-3.4.5/tmp/myid

Finally, write ID to the file

Echo 1 > / cluster/zookeeper-3.4.5/tmp/myid

Copy the configured zookeeper to other nodes (first create a cluster directory under the cluster6 and cluster7 root directories: mkdir / cluster)

Scp-r / cluster/zookeeper-3.4.5/ cluster6:/cluster/

Scp-r / cluster/zookeeper-3.4.5/ cluster7:/cluster/

Note: modify the corresponding / cluster/zookeeper-3.4.5/tmp/myid contents of cluster6 and cluster7

Cluster6:

Echo 2 > / cluster/zookeeper-3.4.5/tmp/myid

Cluster7:

Echo 3 > / cluster/zookeeper-3.4.5/tmp/myid

2.1 start the zookeeper cluster (start zk on cluster5, cluster6 and tcast07, respectively)

Cd / cluster/zookeeper-3.4.5/bin/

. / zkServer.sh start

# View status: one leader, two follower represents success

. / zkServer.sh status

At this point, I believe you have a deeper understanding of the "zookeeper cluster installation steps", might as well come to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report