@linux1s1s
2018-02-09T08:58:49.000000Z
字数 1353
阅读 1820
Big-Data 2018-02
此文详细记录了 Zookpeer 3.4.10 基于Ubuntu 16.0.4 安装的详细过程,以方便后续查阅.
通过前面给出的下载地址,自行下载,然后解压到制定目录
hadoop@mutex-dl:/tmp$ sudo tar zxvf /home/mutex/Downloads/zookeeper-3.4.10.tar.gz -C /usr/local
新建如下目录结构

复制 /usr/local/zookeeper-3.4.10/conf/zoo_sample.cfg 为 zoo.cfg,然后修改这个文件如下:
# The number of milliseconds of each ticktickTime=2000# The number of ticks that the initial# synchronization phase can takeinitLimit=10# The number of ticks that can pass between# sending a request and getting an acknowledgementsyncLimit=5# the directory where the snapshot is stored.# do not use /tmp for storage, /tmp here is just# example sakes.dataDir=/tmp/zookeeper/server001/datadataLogDir=/tmp/zookeeper/server001/logs# the port at which the clients will connectclientPort=2181## 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=1server.1=127.0.0.1:8881:7771server.2=127.0.0.1:8882:7772server.3=127.0.0.1:8883:7773server.4=127.0.0.1:8884:7774server.5=127.0.0.1:8885:7775
修改L12,13,15 已经新增L27-31,然后将该文件copy到
/tmp/zookeeper/server001下,以此类推修改对应的server目录中的zoo.cfg即可,最后的目录结构如下:

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

接着启动连接

启动后的结果

