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

Set up zookeeper cluster

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

Simple zookeeper cluster setup, no excessive optimization configuration

Construction steps:

1: Go to the official website to download a compressed package, and then decompress

2: Modify zoo_sample.cfg in the conf folder after decompression and copy it to zoo.cfg

3: Modify zoo.cfg file, add host information, add as many as there are

server.id =host:port:port, example

server.1=10.99.32.3:2888:3888

Find the dataDir configuration item and modify the directory to a directory defined by yourself, such as/var/zk

4: Add a file named myid in/var/zk (or in the default configuration directory of dataDir if not modified). The content of the file is the value of the current host id. For example, if id is 1, the content of myid is 1. Or you can echo "1">>myid directly

5: Start server: /bin/zkServer.sh start,

If the startup is successful, you can zkServer.sh status to see the status information

Use client tools to connect:

zkCli.sh-server Node name: port

Zookeeper cluster will not fail over automatically, you need to configure keepalived and nginx yourself

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