Linux下Zookeeper集群的安装(2)

  4.将zookeeper-3.4.6拷贝到/usr/local/solrcloud下,复制三份分别并将目录名改为zookeeper1zookeeper2zookeeper3

  

  5.进入zookeeper1文件夹,创建data目录。并在data目录中创建一个myid文件内容为“1”(echo 1 >> data/myid)。

  

  6.进入conf文件夹,把zoo_sample.cfg改名为zoo.cfg

  

Linux下Zookeeper集群的安装

  7.修改zoo.cfg

  dataDir=/usr/local/solrcloud/zookeeper1/data

  clientPort=2181zookeeper2中为2182zookeeper3中为2183

  添加:

  server.1=192.168.198.130:2881:3881

  server.2=192.168.198.130:2882:3882

  server.3=192.168.198.130:2883:3883

  

Linux下Zookeeper集群的安装

  8.对zookeeper23中的设置做第二步至第四步修改。

  zookeeper2

    myid内容为2

    dataDir=/usr/local/solrcloud/zookeeper2/data

    clientPort=2182

  Zookeeper3

    myid内容为3

    dataDir=/usr/local/solrcloud/zookeeper3/data

    clientPort=2183

  9.启动三个zookeeper,查看状态

启动三个zookeeper /usr/local/solrcloud/zookeeper1/bin/zkServer.sh start /usr/local/solrcloud/zookeeper2/bin/zkServer.sh start /usr/local/solrcloud/zookeeper3/bin/zkServer.sh start 查看集群状态: /usr/local/solrcloud/zookeeper1/bin/zkServer.sh status /usr/local/solrcloud/zookeeper2/bin/zkServer.sh status /usr/local/solrcloud/zookeeper3/bin/zkServer.sh status

Linux下Zookeeper集群的安装

CentOS7 上安装 Zookeeper-3.4.9 服务

ZooKeeper官方文档翻译——ZooKeeper Overview 3.4.6 

CentOS下ZooKeeper 3.4.8 集群环境搭建

CentOS 7下Zookeeper集群安装

ZooKeeper学习总结 

Linux下安装Zookeeper集群

Zookeeper3.4.6的安装

CentOS 7下安装 Zookeeper单机版 

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/ad3cd2cda07cbdef3e40cb32ad8e8780.html