一、安装过程
1、进入目录/usr/local,下载并解压zookeeper-3.4.11.tar.gz
2、进入目录/usr/local/zookeeper-3.4.11/conf
3、复制zoo_sample.cfg文件并命名为zoo.cfg
cp zoo_sample.cfg zoo.cfg
4、修改zoo.cfg,设置数据、日志保存目录,结果如下:
dataLogDir: This option will direct the machine to write the transaction log to the dataLogDir rather than the dataDir.
5、配置系统环境变量
至此,ZooKeeper安装完成。
备注:建议删除/usr/local/zookeeper-3.4.12/bin目录下.cmd文件。
二、ZooKeeper命令
zkServer.sh start zkServer.sh restart zkServer.sh stop zkServer.sh status zkCli.sh