Zookeeper deployment
ZooKeeper is a distributed, open source distributed application coordination service, an open source implementation of Google's Chubby, and an important component of Hadoop and Hbase. It is a software that provides consistency services for distributed applications, including configuration maintenance, domain name services, distributed synchronization, group services and so on.
one。 Log in to H2 as hadoop user
Decompress tar xvf zookeeper-3.4.5.tar.gz mv zookeeper-3.4.5 zookeeper
Create a new folder: mkdir-p temp/zookeeper
Add the file myid and add the following to it: 1
Create a new zookeeper/conf/zoo.cfg file:
Touch zookeeper/conf/zoo.cfg
Modify the zookeeper/conf/zoo.cfg to read as follows:
TickTime=2000
InitLimit=10
SyncLimit=5
DataDir=temp/zookeeper
ClientPort=2181
Server.1=h2:2888:3888
Server.2=h3:2888:3888
Server.3=h4:2888:3888
Distribute the zookeeper to the remaining two nodes:
Scp-r zookeeper h3purl /
Scp-r zookeeper h4purse /
two。 Log in to h3 as hadoop user
Create a new folder: mkdir-p temp/zookeeper
Add the file myid and add the following to it: 2
three。 Log in to h4 as hadoop user
Create a new folder: mkdir-p temp/zookeeper
Add the file myid and add the following to it: 3
four。 Log in to H2 as hadoop user
Execute the following command to start the Zookeeper cluster:
Ssh h3 / home/hadoop/zookeeper/bin/zkServer.sh start
Ssh h4 / home/hadoop/zookeeper/bin/zkServer.sh start
five。 Execute / home/hadoop/zookeeper/bin/zkServer.sh status to check the cluster status