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 and deploy zookeeper-3.4.5-cdh5.14.2

2025-01-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

This article will explain in detail how to install and deploy zookeeper-3.4.5-cdh5.14.2. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

1. Three machines install zookeeper cluster

Note: * three machines must ensure clock synchronization

1.1 download the zookeeeper package at the following URL

Http://archive.cloudera.com/cdh6/cdh/5/

We download the zk version we use as zookeeper-3.4.5-cdh6.14.2.tar.gz from this website.

After the download is complete, upload it to our node01 / kkb/soft path to prepare for installation

1.2 decompression

Node01 executes the following command to extract the zookeeper package to the / kkb/install path of the node01 server, and then prepare for installation

Cd / kkb/softtar-zxvf zookeeper-3.4.5-cdh6.14.2.tar.gz-C / kkb/install/1.3 modify configuration file

The first machine modifies the configuration file

Cd / kkb/install/zookeeper-3.4.5-cdh6.14.2/confcp zoo_sample.cfg zoo.cfgmkdir-p / kkb/install/zookeeper-3.4.5-cdh6.14.2/zkdatas

To modify the file with vim zoo.cfg, modify the following attribute values

Add the following three lines to the end of the dataDir=/kkb/install/zookeeper-3.4.5-cdh6.14.2/zkdatasautopurge.snapRetainCount=3autopurge.purgeInterval=1# file: server.1=node01:2888:3888server.2=node02:2888:3888server.3=node03:2888:38881.4 to add myid configuration

Create a file under the / kkb/install/zookeeper-3.4.5-cdh6.14.2/zkdatas/ path of the first machine. The file name is myid and the file content is 1.

Echo 1 > / kkb/install/zookeeper-3.4.5-cdh6.14.2/zkdatas/myid1.5 installation package distribution and modify the value of myid

The following two commands are executed on the first machine

Scp-r / kkb/install/zookeeper-3.4.5-cdh6.14.2/ node02:/kkb/install/scp-r / kkb/install/zookeeper-3.4.5-cdh6.14.2/ node03:/kkb/install/

Change the value of myid to 2 on the second machine; execute the following command directly in any path on the second machine

Echo 2 > / kkb/install/zookeeper-3.4.5-cdh6.14.2/zkdatas/myid

Modify the value of myid to 3 on the third machine; execute the following command directly in any path on the third machine

Echo 3 > / kkb/install/zookeeper-3.4.5-cdh6.14.2/zkdatas/myid1.6 configure environment variables

Configure / etc/profile files for all three nodes

Export ZK_HOME=/kkb/install/zookeeper-3.4.5-cdh6.14.2export PATH=$PATH:$ZK_HOME/bin

Three nodes to make the newly added environment variables take effect (executed under hadoop users)

Three source / etc/profile1.7 machines start the zookeeper service

Three machines start the zookeeper service; this command is executed by all three machines

ZkServer.sh start

View startup status

ZkServer.sh status

The status of a zkServer is either follower or leader

Of the three nodes, one node is leader and the other two are follower, similar to the following figure

Insert a picture description here

1.8 how to shut down a zookeeper cluster

Three nodes running

ZkServer.sh stop

* * Note: * * before shutting down the virtual machine, use the zkServer.sh stop command in each zookeeper server to shut down the zookeeper server.

Otherwise, there may be problems with the cluster.

This is the end of the article on "how to install and deploy zookeeper-3.4.5-cdh5.14.2". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

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

Internet Technology

Wechat

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

12
Report