1: Perform these operations on the 192.168.80.200 server and upload the zookeeper-3.4.5.tar.gz file to the/usr/local directory on the server
2: Unzip: TAR-ZXVF zookeeper-3.4.5.tar.gz
3: Rename: MV zookeeper-3.4.5 zookeeper
4:CD zookeeper/conf
5: Modify the configuration file name: MV Zoo_sample.cfg zoo.cfg
6:vi zoo.cfg
Modifying datadir:/usr/local/zookeeper/data in a configuration file
Add the following configuration:
server.0=192.168.80.200:2888:3888
server.1=192.168.80.201:2888:3888
server.2=192.168.80.202:2888:3888
7:CD.
8: Create directory mkdir data
9: Create file VI myID in the data directory, save the number of the current node in it
Note: The number saved on the 192.168.80.200 server is 0
10:cd/usr/local
11: Copy the Zookeeper directory on the 170 server to the other two nodes
SCP-RQ Zookeeper 192.168.80.201:/usr/local
SCP-RQ Zookeeper 192.168.80.202:/usr/local
12: Connect to 192.168.80.201,cd/usr/local/zookeeper/data modify myID in the number 1
13: Connect to 192.168.80.202,cd/usr/local/zookeeper/data modify myID in the number 2
14: Start the Zookeeper service above the three nodes
Execute command in/usr/local/zookeeper directory on 200: bin/zkserver.sh start
Execute command in/usr/local/zookeeper directory on 201: bin/zkserver.sh Start
Execute command in/usr/local/zookeeper directory on 202: bin/zkserver.sh start
15: Finally, each node is executed JPS Verify that the process starts normally.
Zookeeper Cluster construction