Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

[zookeeper] Cluster installation

Shulou Source: shulou.com Published: 2022-06-03 04:43:55 09月30日 Update

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

Tags: File configuration Cluster tail number folder identity Node transfer Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple MySQL Shulou Technology vpn Shulou Information