[关闭]
@linux1s1s 2018-02-09T16:58:49.000000Z 字数 1353 阅读 1453

Zookpeer 3.4.10 伪分布式 基于Ubuntu16.0.4 配置记录

Big-Data 2018-02


此文详细记录了 Zookpeer 3.4.10 基于Ubuntu 16.0.4 安装的详细过程,以方便后续查阅.

下载Zookpeer

通过前面给出的下载地址,自行下载,然后解压到制定目录

  1. hadoop@mutex-dl:/tmp$ sudo tar zxvf /home/mutex/Downloads/zookeeper-3.4.10.tar.gz -C /usr/local

新建如下目录结构

此处输入图片的描述

配置Zookpeer

复制 /usr/local/zookeeper-3.4.10/conf/zoo_sample.cfgzoo.cfg,然后修改这个文件如下:

  1. # The number of milliseconds of each tick
  2. tickTime=2000
  3. # The number of ticks that the initial
  4. # synchronization phase can take
  5. initLimit=10
  6. # The number of ticks that can pass between
  7. # sending a request and getting an acknowledgement
  8. syncLimit=5
  9. # the directory where the snapshot is stored.
  10. # do not use /tmp for storage, /tmp here is just
  11. # example sakes.
  12. dataDir=/tmp/zookeeper/server001/data
  13. dataLogDir=/tmp/zookeeper/server001/logs
  14. # the port at which the clients will connect
  15. clientPort=2181
  16. #
  17. # Be sure to read the maintenance section of the
  18. # administrator guide before turning on autopurge.
  19. #
  20. # http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
  21. #
  22. # The number of snapshots to retain in dataDir
  23. #autopurge.snapRetainCount=3
  24. # Purge task interval in hours
  25. # Set to "0" to disable auto purge feature
  26. #autopurge.purgeInterval=1
  27. server.1=127.0.0.1:8881:7771
  28. server.2=127.0.0.1:8882:7772
  29. server.3=127.0.0.1:8883:7773
  30. server.4=127.0.0.1:8884:7774
  31. server.5=127.0.0.1:8885:7775

修改L12,13,15 已经新增L27-31,然后将该文件copy到/tmp/zookeeper/server001下,以此类推修改对应的server目录中的zoo.cfg即可,最后的目录结构如下:

此处输入图片的描述

随后在每个zookeeper-3.4.10目录下启动

此处输入图片的描述

接着启动连接

此处输入图片的描述

启动后的结果

此处输入图片的描述

附注

参考: Zookeeper 初体验之——伪分布式安装

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注