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

How to install Cluster Zookeeper-3.4.9 under CentOS 7

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article mainly introduces how to install cluster Zookeeper-3.4.9 under CentOS 7, which has a certain reference value. Interested friends can refer to it. I hope you can learn a lot after reading this article.

Pre-installation preparation

1) download Zookeeper-3.4.9, which can be downloaded directly from the terminal via the following command:

Wget http://archive.apache.org/dist/zookeeper/stable/zookeeper-3.4.9.tar.gz

2) unzip the zookeeper installation package to the / home/hadoop/ directory, which will not be demonstrated here

3) first create the following directory under the zookeeper-3.4.9/ directory

Mkdir / home/hadoop/zookeeper-3.4.9/datamkdir / home/hadoop/zookeeper-3.4.9/logs

Install and configure zookeeper

1) modify the zoo_example.cfg under the / zookeeper-3.4.9/conf/ directory

Cp zoo_example.cfg zoo.cfgvi zoo.cfg

Add the following: (pay attention to case)

DataDir=/home/hadoop/zookeeper-3.4.9/datadataLogDir=/home/hadoop/zookeeper-3.4.9/logsclientPort=2181server.1=master:2888:3888server.2=slave1:2888:3888server.3=slave2:2888:3888

2) create a myid file under the dataDir path and enter the value of x in server.x (note that the value of myid distributed to other nodes after zookeeper is configured on master needs to be changed. Here only use master as an example to demonstrate how to create and modify myid files)

Cd / home/hadoop/zookeeper-3.4.9/datatouch myidvi myid (enter 1 for server.1=master:2888:3888)

3) distribute the configured zookeeper-3.4.9 folder on master to other nodes and modify the values in the / home/hadoop/zookeeper-3.4.9/data/myid file

Scp-r / home/hadoop/hadoop-2.7.3 hadoop@slave1:/home/hadoop/scp-r / home/hadoop/hadoop-2.7.3 hadoop@slave2:/home/hadoop/

The modified value section is no longer displayed. For details, please refer to 2).

4) enter the zookeeper-3.4.9/bin/ directory of each machine, and execute the following command to enable the cluster zookeeper feature:

. / zkServer.sh start

You can view the status of zookeeper with the following command:

. / zkServer.sh status

As shown in the following figure:

Thank you for reading this article carefully. I hope the article "how to install Cluster Zookeeper-3.4.9 under CentOS 7" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you 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