三个节点:
10.0.0.11 dockerapache-01
10.0.0.12 dockerapache-02 #管理节点
10.0.0.13 dockerapache-03
首先的首先,安装hadoop
https://blog.csdn.net/gulugulu_gulu/article/details/105724788
zookeeper的安装
-
下载安装包, 上传到服务器各个节点上,解压至【/usr/local】
https://downloads.apache.org/zookeeper/zookeeper-3.6.0/apache-zookeeper-3.6.0-bin.tar.gz -
配置zoo.cfg
进入zookeeper的conf目录,创建zoo.cfg文件, 可采用如下方式,进行配置。 三个节点都一样的配置。
cp zoo_sample.cfg zoo.cfg
vim 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=/var/log/zookeeper/data
dataLogDir=/var/log/zookeeper/logs
# the port at which the clients will connect
clientPort=2181
# the maximum number of client connections.
# increase this if you need to handle more clients
#maxClientCnxns=60
#
# 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