简单易懂Kafka搭建
生活随笔
收集整理的這篇文章主要介紹了
简单易懂Kafka搭建
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
kafka搭建
cd /usr/localwget http://mirror.bit.edu.cn/apache/kafka/2.2.0/kafka_2.11-2.2.0.tgz
下載完成后解壓
解壓后進入看下基本的結構
logs是日志記錄的目錄,config是基本配置文件的目錄。bin是啟動目錄所在。
首先進入config修改下配置
cd config/#編輯配置文件 vi server.properties # The id of the broker. This must be set to a unique integer for each broker. broker.id=0 # The address the socket server listens on. It will get the value returned from listeners=PLAINTEXT://172.20.42.10:9092 port=9092 # Zookeeper connection string (see zookeeper docs for details) zookeeper.connect=localhost:2181修改后保存。切換到bin目錄下:
啟動kafka,啟動kafka前需要先啟動zookeeper。
啟動zookeeper命令:
nohup ./zookeeper-server-start.sh /usr/local/kafka_2.11-2.2.0/config/zookeeper.properties &
啟動kafka命令:
nohup ./kafka-server-start.sh /usr/local/kafka_2.11-2.2.0/config/server.properties &
總結
以上是生活随笔為你收集整理的简单易懂Kafka搭建的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 漫画 | Linux 内核,简直太形象了
- 下一篇: Unraid USB启动盘怎么更换和重新