[root@hadoop001 /]# cd /usr/[root@hadoop001 usr]# ls
bin etc games hadoop330 include java lib lib64 libexec local sbin share src tmp
[root@hadoop001 usr]# mkdir zookeeper370[root@hadoop001 usr]# ls
bin etc games hadoop330 include java lib lib64 libexec local sbin share src tmp zookeeper370
[root@hadoop001 usr]# cd ..[root@hadoop001 /]# cd /opt/[root@hadoop001 opt]# ls
apache-hive-3.1.2-bin.tar.gz hbase-2.4.2-bin.tar.gz VMwareTools-10.3.21-14772444.tar.gz
apache-zookeeper-3.7.0-bin.tar.gz rh vmware-tools-distrib
[root@hadoop001 opt]# tar -zxvf apache-zookeeper-3.7.0-bin.tar.gz -C /usr/zookeeper370
[root@hadoop001 apache-zookeeper-3.7.0-bin]# cd /usr/zookeeper370/apache-zookeeper-3.7.0-bin/conf/[root@hadoop001 conf]# ls
configuration.xsl log4j.properties zoo_sample.cfg
[root@hadoop001 conf]# cp zoo_sample.cfg zoo.cfg[root@hadoop001 conf]# vim zoo.cfg[root@hadoop001 conf]# cat 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/zookeeper370/apache-zookeeper-3.7.0-bin/zkData
dataLogDir=/usr/zookeeper370/apache-zookeeper-3.7.0-bin/tmp/logs
##########cluster##########
server.001=hadoop001:2888:3888
server.002=hadoop002:2888:3888
server.003=hadoop003:2888:3888
# 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 auto purge feature#autopurge.purgeInterval=1## Metrics Providers## https://prometheus.io Metrics Exporter#metricsProvider.className=org.apache.zookeeper.metrics.prometheus.PrometheusMetricsProvider#metricsProvider.httpPort=7000#metricsProvider.exportJvmInfo=true[root@hadoop001 conf]# [root@hadoop001 conf]# cd ..