9、远程拷贝到【a1】与【a2】
scp -r /opt/zookeeper a1:/opt/zookeeper scp -r /opt/zookeeper a2:/opt/zookeeper
10、修改【a1】与【a2】的myid编号
vi /opt/zookeeper/data/myid
11、脚本拷贝并执行
scp -r /etc/profile.d/hadoop-eco.sh a1:/etc/profile.d/hadoop-eco.sh scp -r /etc/profile.d/hadoop-eco.sh a2:/etc/profile.d/hadoop-eco.sh
12、关闭防火墙
systemctl stop firewalld.service systemctl disable firewalld.service
13、启动【zkServer】集群并查看状态
zkServer.sh start zkServer.sh status
三台机器都启动后查看状态。
成功。
14、测试
zk客户端
zkCli.sh -server master:2181
命令测试:
create /zk "myData" ls / get /zk watch set /zk "Biadu" get /zk watch delete /zk ls /