目录 下载配置启动 下载 下载链接 https://archive.apache.org/dist/zookeeper/上传 我直接本地下好了,拖到对应文件夹解压,重命名,注意路径 tar -zxvf /opt/Zookeeper/apache-zookeeper-3.7.2-bin.tar.gz -C /opt/ mv /opt/apache-zookeeper-3.7.2-bin /opt/zookeeper 在安装目录下创建zkdata和zkdatalog两个文件夹 配置 安装目录/conf/zoo_sample.cfg复制粘贴一份zoo.cfg cp /opt/zookeeper/conf/zoo_sample.cfg /opt/zookeeper/conf/zoo.cfg 修改 dataDir=/opt/zookeeper/zkdata dataLogDir=/opt/zookeeper/zkdatalog 配置环境变量 echo 'export ZOOKEEPER_HOME=/opt/zookeeper/' >> /etc/profile echo 'export PATH=$PATH:$ZOOKEEPER_HOME/bin' >> /etc/profile source /etc/profile 启动 zkServer.sh start zkServer.sh status zkCli.sh