对于zookeeper,真的是连一知半解的算不上,因为涉及到内部通信接口,所以才试着做。再整理下zookeeper。
linux下安装zookeeper:
1、在user/local目录下,下载zookeeper:
wget https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/zookeeper-3.5.8/apache-zookeeper-3.5.8-bin.tar.gz
2、解压
tar -zxvf tar -zxvf apache-zookeeper-3.5.8-bin.tar.gz
3、修改配置
进入conf目录:cd apache-zookeeper-3.5.6/conf
将zoo_sample.cfg这个文件复制为zoo.cfg (必须是这个文件名):cp zoo_sample.cfg zoo.cfg
编辑zoo.cfg文件,修改一下内容
dataDir=/tmp/zookeeper/data
dataLogDir=/tmp/zookeeper/log
涉及集群方面设置,暂时没需要,我就先跳过,后面再续;
然后创建文件夹:

4、进入apache-zookeeper-3.5.8-bin/bin文件夹下,启动

本文详细介绍了在Linux环境下安装和配置Zookeeper的过程,包括下载、解压、配置环境变量及启动服务等步骤,适合初学者快速上手。
312

被折叠的 条评论
为什么被折叠?



