乌班图安装zookeeper
时间: 2023-11-09 18:01:49 浏览: 107
zookeeper的安装
安装 ZooKeeper 可以通过以下步骤完成:
1. 下载 ZooKeeper:可以从官网下载最新版本的 ZooKeeper,也可以使用以下命令下载:
```
wget https://downloads.apache.org/zookeeper/zookeeper-3.6.3/apache-zookeeper-3.6.3-bin.tar.gz
```
2. 解压缩文件:
```
tar -zxvf apache-zookeeper-3.6.3-bin.tar.gz
```
3. 配置 ZooKeeper:
```
cd apache-zookeeper-3.6.3-bin/conf
cp zoo_sample.cfg zoo.cfg
```
4. 启动 ZooKeeper:
```
cd ..
bin/zkServer.sh start
```
5. 验证 ZooKeeper 是否启动成功:
```
bin/zkCli.sh
```
如果成功启动,将会看到以下输出:
```
Connecting to localhost:2181
Welcome to ZooKeeper!
JLine support is disabled
WATCHER::
WatchedEvent state:SyncConnected type:None path:null
[zk: localhost:2181(CONNECTED) 0]
```
阅读全文