1.下载
2.解压
3.权限
sudo chown -R 节点名:9000 /opt/zookeeper/
4.修改配置文件
cd /opt/zookeeper/conf
cp zoo_sample.cfg zoo.cfg
vi zoo.cfg
只改#example sakes下的一个文件路径就行了,data自己手动创建
example sakes.
dataDir=/opt/zookeeper/data
5.添加环境变量,注意不是/etc/profile
vi ~/.bashrc
export ZOOKEEPER_HOME=/usr/local/apache-zookeeper-3.5.5-bin
export PATH=PATH
6.使变量生效
source ~/.bashrc
7.启动
zkServer.sh start
8.验证
zkServer.sh status
当出现
Mode: standalone
成功
来源:https://blog.csdn.net/big_data_study/article/details/100808044