https://jingyan.baidu.com/article/335530dafd4b3619cb41c3d8.html
tar -zxvf xx
cd xx/conf
mv zoo_sample.cfg zoo.cfg
vim zoo.cfg change the datadir to the directory you want, and then create this directory such as /root//zkdata
Add at the end of zoo.cfg
server.1=ip:2888:3888
server.2=ip:2888:3888
add all ip's
echo 1 > /root/zkdata/myid
echo 2 > /root/zkdata/myid
Enter the corresponding input, mark the zk id
The role of 3 ports
1. 2181: Provide services to the cline side
2. 3888: Election leader use
3. 2888: used for machine communication in the cluster (Leader listens to this port)