Practice series – Kafka cluster deployment

Time:2021-9-8

Version selection

kafka_2.12-0.11.0.3
Version number Description: Kafka is developed using Scala. The previous 2.12 is the version number of Scala, and the later is the version number of Kafka.
Version 0.11 is already a relatively complete version of Kafka. The later versions are all kinds of enhancements to streaming. If it is only used as a message queue, use version 0.11.

Download address

https://archive.apache.org/di…

Deployment details

Download, upload, decompression and other processes are omitted.
The main configuration files are:/config/server.properties
Key configurations:

#The broker ID must be globally unique
broker.id=0
#The location of log is the location where the actual data is stored
log.dirs=/usr/local/kafka_2.12-0.11.0.3/data
#Enable the function of deleting topic
delete.topic.enable=true
#Zookeeper cluster configuration
zookeeper.connect=192.168.1.73:2181,192.168.1.52:2181,192.168.1.102:2181

Common commands

Start:./kafka-server-start.sh -daemon ../config/server.properties
stop it:./kafka-server-stop.sh stop

August 29, 2021 (note)

According to the actual measurement, the openjdk11 and kafka0.11 installed on this machine are not supported.
I returned to normal after changing to JDK1.8.
You can also choose the updated Kafka version to use, so you don’t need to replace the JDK.