kafka集群搭建
一、安装多节点ZooKeeper集群 下面就是在本机一台机器上安装3个节点的ZooKeeper集群,在多台机器上安装的方法和一台机器上是一样的,就是配置文件有微小的调整。 1.下载ZooKeeper包 https://www-us.apache.org/dist/zookeeper/stable/ 下载带bin的tar.gz文件,目前是apache-zookeeper-3.5.6-bin.tar.gz 解压 tar -zxvf apache-zookeeper-3.5.6-bin.tar.gz 把解压文件移动到/usr/local sudo mv apache-zookeeper-3.5.6-bin /usr/local/ 2.创建配置文件 在ZooKeeper的conf目录下创建3个配置文件zoo1.cfg,zoo2.cfg,zoo3.cfg,如果是在多台服务器上安装ZooKeeper集群可以取相同的配置文件名字。 zoo1.cfg tickTime=2000 dataDir=/home/xl/zookeeper/data_logs/zookeeper1 clientPort=2181 initLimit=5 syncLimint=2 server.1=localhost:2888:3888 server.2=localhost:2889:3889 serve.3