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

[zookeeper] Cluster installation

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

Share

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

1. Decompress (follow simple installation)

two。 Modify the configuration file

Vim zoo.cfg-# The number of milliseconds of each ticktickTime=2000# The number of ticks that the initial # synchronization phase can takeinitLimit=10# The number of ticks that can pass between # sending a request and getting an acknowledgementsyncLimit=5# the directory where the snapshot is stored.# do not use / tmp for storage / tmp here is just # example sakes.dataDir=/usr/local/zookeeper/datadataLogDir=/usr/local/zookeeper/log# the port at which the clients will connectclientPort=2181# the maximum number of client connections.# increase this if you need to handle more clients#maxClientCnxns=60## Be sure to read the maintenance section of the # administrator guide before turning on autopurge.## http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance## The number of snapshots to retain in dataDir#autopurge.snapRetainCount=3# Purge task interval in hours# Set To "0" to disable autopurge feature#autopurge.purgeInterval=1server.186=10.1.44.186:2888:3888server.187=10.1.44.187:2888:3888server.188=10.1.44.188:2888:3888

3. Create the required folder

Mkdir-p / usr/local/zookeeper/datamkdir-p / usr/local/zookeeper/log

4. Configuration files are transferred to other zookeeper cluster nodes

Scp zoo.cfg

5. Create a myid identity file (same as the tail number of server.186 above)

# 186 servercd / usr/local/zookeeper/dataecho '186' > myid # 187 servercd / usr/local/zookeeper/dataecho '187' > myid # 188 servercd / usr/local/zookeeper/dataecho '188' > myid

6. Start

# 186 server/usr/local/zookeeper/bin/zkServer.sh start-ZooKeeper JMX enabled by defaultUsing config: / usr/local/zookeeper/bin/../conf/zoo.cfgStarting zookeeper... STARTED/usr/local/zookeeper/bin/zkServer.sh status-ZooKeeper JMX enabled by defaultUsing config: / usr/local/zookeeper/bin/../conf/zoo.cfgMode: follower# 187 server/usr/local/zookeeper/bin/zkServer.sh start-ZooKeeper JMX enabled by defaultUsing config: / usr/local/zookeeper/bin/../conf/zoo.cfgStarting zookeeper... STARTED/usr/local/zookeeper/bin/zkServer.sh status-ZooKeeper JMX enabled by defaultUsing config: / usr/local/zookeeper/bin/../conf/zoo.cfgMode: leader# 188 server/usr/local/zookeeper/bin/zkServer.sh start-ZooKeeper JMX enabled by defaultUsing config: / usr/local/zookeeper/bin/../conf/zoo.cfgStarting zookeeper... Already running as process 1946./usr/local/zookeeper/bin/zkServer.sh status-ZooKeeper JMX enabled by defaultUsing config: / usr/local/zookeeper/bin/../conf/zoo.cfgMode: follower

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