单机安装zookeeper和kafka

Posted woaibaobei

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了单机安装zookeeper和kafka相关的知识,希望对你有一定的参考价值。

一、Zookeeper
1. 下载解压
tar -zxvf apache-zookeeper-3.6.3-bin.tar.gz
1
2. 配置(非必须)
cd conf/
cp zoo_sample.cfg zoo.cfg
vi zoo.cfg

可以根据自己的需要进行配置,一般默认即可

# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just
# example sakes.
dataDir=/tmp/zookeeper
# the port at which the clients will connect
clientPort=2181

3. 启动zookeeper
启动命令:./bin/zkServer.sh

root@ACE:/usr/local/zookeeper/apache-zookeeper-3.6.3-bin# ./bin/zkServer.sh start
ZooKeeper JMX enabled by default
Using config: /usr/local/zookeeper/apache-zookeeper-3.6.3-bin/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED

 

 

下载kafka  二进制文件

 

http://mirrors.tuna.tsinghua.edu.cn/apache/kafka/2.3.0/kafka_2.12-2.3.0.tgz
tar -xzvf kafka_2.12-2.3.0.tgz
mv kafka_2.12-2.3.0 kafka
bin/zookeeper-server-start.sh -daemon config/zookeeper.properties

 

 

参考地址: 单机zookeeper和kafka的安装和启动_郭建華的博客-CSDN博客

以上是关于单机安装zookeeper和kafka的主要内容,如果未能解决你的问题,请参考以下文章

单机安装zookeeper和kafka

zookeeper的安装与配置(单机和集群)

ZooKeeper系列1.ZooKeeper单机版伪集群和集群环境搭建

zookeeper单机版安装

单机kafka安装使用

Linux单机安装Zookeeper