简体   繁体   中英

Curl Kafka installation is not working in ubantu

i follow the below steps to install the kafka on the ubantu vm instance on google cloud and got the below error

mkdir ~/Downloads
curl "https://www.apache.org/dist/kafka/2.1.1/kafka_2.11-2.1.1.tgz" -o ~/Downloads/kafka.tgz
mkdir ~/kafka && cd ~/kafka

i get the below error when extract the kafka.tgz file

tar -xvzf ~/Downloads/kafka.tgz --strip 1
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now

Where can I get the latest kafka.tgz link for the latest Kafka binary download and how do I fix the above tgz extract issue?

Kafka 2.1.1 doesn't exist anymore in the Apache mirrors , and is not the latest version.

There is no direct link to get latest , but you can get the URL through the links of the Apache Kafka homepage.

Here is how you would install version 3.2.1

KAFKA_VERSION=3.2.1
mkdir -p /opt/kafka_$KAKFA_VERSION \
  && curl -s https://downloads.apache.org/kafka/$KAFKA_VERSION/kafka_2.13-$KAFKA_VERSION.tgz \
  | tar -xvz --strip-components=1 -C /opt/kafka_$KAFKA_VERSION
ln -s /opt/kafka_$KAFKA_VERSION/ /opt/kafka

# TODO: add kafka unix user and chown the folder(s)

Alternatively, you could run Kafka as a Docker container or install Confluent Platform with apt-get , which will include SystemD scripts for managing Kafka, Zookeeper, and more.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM