- 下载zookeeper
[root@aliyun ljl]# wget https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/zookeeper-3.4.14/zookeeper-3.4.14.tar.gz
- 解压安装包
[root@aliyun ljl]# tar -zxvf zookeeper-3.4.14.tar.gz
3.修改配置文件
复制配置文件
[root@aliyun ljl]# cp zoo_sample.cfg zoo.cfg
编辑配置文件
dataDir=/usr/local/zookeeper/zookeeper-3.4.14/data
dataLogDir=/usr/local/zookeeper/zookeeper-3.4.14/log
添加环境变量
vim /etc/.zookeeper
### 添加内容
export ZOOKEEPER_HOME=/usr/local/zookeeper/zookeeper-3.4.14
export PATH=$PATH:$ZOOKEEPER_HOME/bin
### 执行命令使全局生效
source /etc/.zookeeper
- 启动zookeeper
zkServer.sh start
- zkCli.sh 访问zookeeper节点
zkCli.sh
网友评论