server.2=bigdata1:2888:3888
server.3=bigdata2:2888:3888
server.4=bigdata3:2888:3888
修改
dataDir=/opt/module/zookeeper-3.5.7/data
分发zookeeper
scp -r /opt/module/zookeeper-3.5.7/ root@bigdata2:/opt/module/
scp -r /opt/module/zookeeper-3.5.7/ root@bigdata3:/opt/module/
修改bigdata2和bigdata3中的zookeeper下的data中myid的值分别改为3和4
与下方的对应
server.2=bigdata1:2888:3888
server.3=bigdata2:2888:3888
server.4=bigdata3:2888:3888
修改名称使环境变量里的和module下的一致
在module下:
mv apache-zookeeper-3.5.7-bin zookeeper-3.5.7
mv kafka_2.12-2.4.1 kafka-2.12
启动zookeeper
三台都启动
启动后jps查看进程 QuorumPeerMain
zkServer.sh start
![在这里插入图片描述](https://img-blog.csdnimg.cn/direct/e1de483ffcf