cd /opt/zookeeper/conf
cp zoo_sample.cfg zoo-1.cfg
ls
vi zoo-1.cfg
dataDir=/tmp/zoo-1
#the
clinetPort=2181
server.1=127.0.0.1:2888:3888
server.2=127.0.0.1:2889:3889
server.3=127.0.0.1:2890:3890
cp zoo-1.cfg zoo-2.cfg
vi zoo-2.cfg
dataDir=/tmp/zoo-2
#the
clinetPort=2182
cp zoo-1.cfg zoo-3.cfg
vi zoo-3.cfg
dataDir=/tmp/zoo-3
#the
clinetPort=2183
cd /opt/zookeeper
mkdir /tmp/zoo-1
mkdir /tmp/zoo-2
mkdir /tmp/zoo-3
vi /tmp/zoo-1/myid 1 wq
vi /tmp/zoo-2/myid 2 wq
vi /tmp/zoo-3/myid 3 wq
cd /opt/zookeeper/bin
./zkServer.sh start ../conf/zoo-1.cfg
./zkServer.sh start ../conf/zoo-2.cfg
./zkServer.sh start ../conf/zoo-3.cfg
./zkServer.sh status ../conf/zoo-1.cfg
./zkServer.sh status ../conf/zoo-2.cfg
./zkServer.sh status ../conf/zoo-3.cfg
版权归原作者 Z宏伟蓝图Z 所有, 如有侵权,请联系我们删除。