安装zookeeper
mkdir apps
tar -zxvf zookeeper-3.4.5.tar.gz -C apps
[root@mini1 zookeeper-3.4.5]# rm -rf src/ *.xml *.txt
[root@mini1 zookeeper-3.4.5]# rm -rf docs dist-maven/
[root@mini1 zookeeper-3.4.5]# cd conf
[root@mini1 conf]# cp zoo_sample.cfg zoo.cfg
[root@mini1 conf]# vi zoo.cfg
[root@mini1 ~]# scp -r apps/ root@mini2:/root
[root@mini1 ~]# scp -r apps/ root@mini3:/root
在mini2.mini3,同样要建立zkdata, myid分别为2、3
各个结点启动zookeeper
(前提是一定要每个节点装好jdk)
[root@mini2 bin]# ./zkServer.sh start
[root@mini2 bin]# ./zkServer.sh status