tar -zxvf apache-zookeeper-3.5.9-bin.tar.gz -C /usr/local/
如下图
重命名为 zookeeper
mv apache-zookeeper-3.5.9-bin zookeeper
如下图
2.zookeeper配置文件介绍
进入 zookeeper 配置文件 usr/local/zookeeper/conf/
给 zoo_sample.cfg 配置文件重命名为 zoo.cfg
mv zoo_sample.cfg zoo.cfg
配置文件介绍
# The number of milliseconds of each tick# 用于计算基础的实际单位tickTime=2000# The number of ticks that the initial # synchronization phase can take# 初始化时间initLimit=10# The number of ticks that can pass between # sending a request and getting an acknowledgement# 选举时间syncLimit=5# the directory where the snapshot is stored.# do not use /tmp for storage, /tmp here is just # example sakes.# 配置zookeeper数据存放路径dataDir=/tmp/zookeeper
# 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