工具篇:zookeeper

it2022-05-05  117

zookeeper入门(zk介绍,并使用本地多个配置文件启动伪集群):https://www.jianshu.com/p/1f4c70d7ef40

#启动server(如果配置文件是/path/to/zk/conf/zoo.cfg,那么可以省略该参数) /path/to/zk/bin/zkServer.sh start /path/to/zk/conf/zoo.cfg #查看服务状态 /path/to/zkServer.sh status /path/to/zk/conf/zoo.cfg #停止server /path/to/zk/bin/zkServer.sh stop /path/to/zk/conf/zoo.cfg #启动client /path/to/zk/bin/zkCli.sh -server localhost:2181 #退出client quit #启动server伪集群,3个配置文件的端口必须互不相同 /path/to/zk/bin/zkServer.sh start /path/to/zk/conf/zoo1.cfg /path/to/zk/bin/zkServer.sh start /path/to/zk/conf/zoo2.cfg /path/to/zk/bin/zkServer.sh start /path/to/zk/conf/zoo3.cfg #启动client连接集群 /path/to/zk/bin/zkCli.sh -server localhost:2181,localhost:2182,localhost:2183

 


最新回复(0)