zookeeper集群安装

2023-12-15 04:44:59

? ? 1.安装zookeeper(node02,node03,node04)

node02:
?? ??? ??? ?tar xf zook....tar.gz
?? ??? ??? ?mv zoo... ? ?/opt/bigdata
?? ??? ??? ?cd /opt/bigdata/zoo....
?? ??? ??? ?cd conf
?? ??? ??? ?cp zoo_sample.cfg ?zoo.cfg
?? ??? ??? ?vi zoo.cfg
?? ??? ??? ??? ?datadir=/var/bigdata/hadoop/zk
?? ??? ??? ??? ?server.1=node02:2888:3888
?? ??? ??? ??? ?server.2=node03:2888:3888
?? ??? ??? ??? ?server.3=node04:2888:3888
?? ??? ??? ?mkdir /var/bigdata/hadoop/zk
?? ??? ??? ?echo 1 > ?/var/bigdata/hadoop/zk/myid?
?? ??? ??? ?vi /etc/profile
?? ??? ??? ??? ?export ZOOKEEPER_HOME=/opt/bigdata/zookeeper-3.4.6
?? ??? ??? ??? ?export ????????????????PATH=$PATH:$JAVA_HOME/bin:$HADOOP_HOME/bin:$HADOOP_HOME/sbin:$ZOOKEEPER_HOME/bin
?? ??? ??? ?. /etc/profile
?? ??? ??? ?cd /opt/bigdata
?? ??? ??? ?scp -r ./zookeeper-3.4.6 ?node03:`pwd`
?? ??? ??? ?scp -r ./zookeeper-3.4.6 ?node04:`pwd`
?? ??? ?node03:
?? ??? ??? ?mkdir /var/bigdata/hadoop/zk
?? ??? ??? ?echo 2 > ?/var/bigdata/hadoop/zk/myid
?? ??? ??? ?*环境变量
?? ??? ??? ?. /etc/profile
?? ??? ?node04:
?? ??? ??? ?mkdir /var/bigdata/hadoop/zk
?? ??? ??? ?echo 3 > ?/var/bigdata/hadoop/zk/myid
?? ??? ??? ?*环境变量
?? ??? ??? ?. /etc/profile

?? ??? ?node02~node04:
?? ??? ??? ?zkServer.sh start

文章来源:https://blog.csdn.net/dongwen000/article/details/134930331
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。