kuhuo
kuhuo
发布于 2024-06-27 / 208 阅读
0
0

第2章 第5节 Zookeeper 安装

1 上传zookeeper /opt/software

2 解压zookeeper/opt/software

cd /opt/upload

tar -zxvf apache-zookeeper-3.9.1-bin.tar.gz -C /opt/software/

2 重命名zookeeper

mv apache-zookeeper-3.9.1-bin/ zookeeper-3.9.1

3 创建zoo.cfg

cd /opt/software/zookeeper-3.9.1/conf

cp zoo_sample.cfg zoo.cfg

4 修改 zoo.cfg

cd /opt/software/zookeeper-3.9.1/conf

vim zoo.cfg

修改以下内容

dataDir=/opt/software/zookeeper-3.9.1/zookeeper

5 启动zookeeper

cd /opt/software/zookeeper-3.9.1/bin

./zkServer.sh start

6 查看zookeeper状态

cd /opt/software/zookeeper-3.9.1/bin

./zkServer.sh status

出现standalone,表示安装成功。

7 停止zookeeper

cd /opt/software/zookeeper-3.9.1/bin

./zkServer.sh stop


评论