cd /usr/local/apache-zookeeper-3.6.1-bin/conf
cp zoo_sample.cfg zoo.cfg
cat 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.
dataDir=/tmp/zookeeper
# the port at which the clients will connect
clientPort=2181
启动 zookeeper
service zookeeper start
启动日志如下
ZooKeeper JMX enabled by default
Using config: /usr/local/apache-zookeeper-3.6.1-bin/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED