赞
踩
ZooKeeper服务器是用Java创建的,它运行在JVM之上。需要安装JDK 7或更高版本。
将下载的ZooKeeper放到/export/software目录下
zookeeper安装包:
http://链接:https://pan.baidu.com/s/1AqPhiU4ZZkNJu-I_bx6cAg 提取码:o8e4
进入/export/software目录下,将tar包解压到/export/servers目录下
tar -xzvf apache-ZooKeeper-3.5.6-bin.tar.gz -C /export/servers
在/etc/profile全局配置文件中,添加:
export ZK_HOME=/export/servers/apache-zookeeper-3.5.6-bin
export PATH=$PATH:$ZK_HOME/bin
进入到conf目录拷贝一个zoo_sample.cfg并完成配置
cd /export/servers/apache-zookeeper-3.5.6-bin/conf
cp zoo_sample.cfg zoo.cfg
修改zoo.cfg
cd /export/data
mkdir zkdata
vi /export/servers/apache-zookeeper-3.5.6-bin/conf/zoo.cfg
dataDir=/export/data/zkdata
进入目录
cd /export/servers/apache-zookeeper-3.5.6-bin/bin
启动命令
./zkServer.sh start
./zkServer.sh status
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。