### Zookeeper 服务常用命令
```shell
启动 ZooKeeper 服务:./zkServer.sh start
查看 ZooKeeper 服务状态:./zkServer.sh status
停止 ZooKeeper 服务:./zkServer.sh stop
重启 ZooKeeper 服务:./zkServer.sh restart
```
### zookeeper 的客户端常用命令
##### 启动 zookeeper 客户端
![1677833684383](C:\Users\wangh\Desktop\播客园-flink\vm-zookeeper安装\assets\1677833684383.png)
##### 连接ZooKeeper服务端
```shell
./zkCli.sh -server ip:port
```
##### 断开连接
```shell
quit
```
##### 查看命令帮助
```shell
help
```
##### 显示指定目录下节点
```shell
ls 目录
```
##### 创建节点
```shell
create /节点path value
```
##### 获取节点值
```shell
get /节点path
```
##### 设置节点值
```shell
set /节点path value
```
##### 删除单个节点
```shell
delete /节点path
```
##### 删除带有子节点的节点
```shell
deleteall /节点path
```
##### 创建临时节点
```shell
create -e /节点path value
```
##### 创建顺序节点
```shell
create -s /节点path value
```
##### 查询节点详细信息
```shell
ls -s /节点path
```
标签:zookeeper,ZooKeeper,sh,常用命令,path,#####,节点 From: https://www.cnblogs.com/qingtianyu2015/p/17176570.html