Zookeeper学习记录 - mac下安装部署
一、下载
二、解压
三、data&log
新建数据文件夹 data
/Users/www/zookeeper/data
新建日志文件夹 log
/Users/www/zookeeper/log
四、配置
zookeeper conf 目录下, 新建 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=/Users/www/zookeeper/data # log目录, 同样可以是任意目录. 如果没有设置该参数, 将使用和#dataDir相同的设置. dataLogDir=/Users/www/zookeeper/log # the port at which the clients will connect clientPort=2181
五、启动
zookeeper bin 目录下
./zkServer.sh start
六、停止
zookeeper bin 目录下
./zkServer.sh stop
参考资料