对于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文件夹下,启动