修改配置文件conf/zoo.cfg:设置dataDir=自己目录,该目录必须存在。
# 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.
dataDir=E:\java\zookeeper-3.3.6\data
# the port at which the clients will connect
clientPort=2181