标签:3.1 tmp java 最新版 code led 下载 节点 lan
简介zookeeper:分布式协调应用程序
官方网站:http://zookeeper.apache.org/
最新版本:3.4.13
下载地址:https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/zookeeper-3.4.13/zookeeper-3.4.13.tar.gz
vim /etc/hosts
192.168.33.14 node4
192.168.33.15 node5
192.168.33.16 node6
yum -y install java
yum -y install wget
wget https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/zookeeper-3.4.13/zookeeper-3.4.13.tar.gz
tar xf zookeeper-3.4.13.tar.gz
mv zookeeper-3.4.13 /usr/local/zookeeper
mv /usr/local/zookeeper/conf/zoo{_sample,}.cfg
cat >> /usr/local/zookeeper/conf/zoo.cfg<<EOF
server.1 = node4:2888:3888
server.2 = node5:2888:3888
server.3 = node6:2888:3888
EOF
node4:
echo 1 > /tmp/zookeeper/myid
node5:
echo 2 > /tmp/zookeeper/myid
node6:
echo 3 > /tmp/zookeeper/myid
cd /usr/local/zookeeper/bin && ./zkServer.sh start
查看下面的信息说明集群配置正常,如果不正常,查看日志文件/usr/local/zookeeper/bin/zookeeper.out
./zkServer.sh status
ZooKeeper JMX enabled by default
Using config: /usr/local/zookeeper/bin/../conf/zoo.cfg
Mode: leader
标签:3.1 tmp java 最新版 code led 下载 节点 lan
原文地址:http://blog.51cto.com/hzde0128/2299600