Linux安装zookeeper

1.tar -zxvf zoo.....

2.cd zookeeper-3.4.8/conf/
cp zoo_sample.cfg zoo.cfg

zoo.cfg 配置
tickTime=2000

initLimit=10

syncLimit=5

dataDir=/usr/local/zookeeper/zookeeper-3.4.8/data
dataLogDir=/usr/local/zookeeper/zookeeper-3.4.8/dataLog

clientPort=2181

server.1=192.168.84.128:2888:3888

server.2=192.168.84.131:2888:3888

server.3=192.168.84.132:2888:3888

maxClientCnxns=60


3.在/usr/local/zookeeper/zookeeper-3.4.8/data文件夹下创建myid文件 标注server id  1,2,3...


4.
进入bin目录,启动、停止、重启分和查看当前节点状态(包括集群中是何角色)别执行:

./zkServer.sh start
./zkServer.sh stop
./zkServer.sh restart
./zkServer.sh status

 

你可能感兴趣的:(Linux,zookeeper,Linux)