728x90
Installing a package to use the Kafka command(kafka-topics.sh)
Install Azul Zulu on RPM-based Linux(CentOS 7)
https://docs.azul.com/core/zulu-openjdk/install/rpm-based-linux
Install from Azul RPM repository
yum install -y https://cdn.azul.com/zulu/bin/zulu-repo-1.0.0-1.noarch.rpm
Install the required Azul Zulu package
yum install -y zulu11-jdk
Check the java version
/usr/lib/jvm/zulu11/bin/java --version
$ /usr/lib/jvm/zulu11/bin/java --version
openjdk 11.0.13 2021-10-19 LTS
OpenJDK Runtime Environment Zulu11.52+13-CA (build 11.0.13+8-LTS)
OpenJDK 64-Bit Server VM Zulu11.52+13-CA (build 11.0.13+8-LTS, mixed mode)
Setting environmental variables(JAVA PATH)
vim /etc/profile
export JAVA_HOME=/usr/lib/jvm/zulu11
export PATH=$JAVA_HOME/bin:$PATH
source /etc/profile
728x90
Kafka package installation
Download Kafka URL : https://kafka.apache.org/downloads
Install kafka
wget https://archive.apache.org/dist/kafka/2.8.1/kafka_2.13-2.8.1.tgz
tar xvfz kafka_2.13-2.8.1.tgz
cd kafka_2.13-2.8.1/bin
Kafka(kafka-topics.sh) command execution
./kafka-topics.sh --create --zookeeper 192.168.0.101:2181 –replication-factor 3 --partitions 3 --topic my-topic
./kafka-topics.sh --list --zookeeper 192.168.0.101:2181
$ ./kafka-topics.sh --list --zookeeper 192.168.0.101:2181
my-topic
728x90
'리눅스' 카테고리의 다른 글
[draft] mkpasswd 명령어 (0) | 2021.12.02 |
---|---|
[Linux] How to build and push Docker images with GitHub Actions (0) | 2021.11.30 |
[draft] Kafka Broker 및 ZooKeeper의 버전을 확인하는 방법 (0) | 2021.11.30 |
도커 컨테이너 터미널 프롬프트(PS1) 색상 변경 (0) | 2021.11.25 |
[draft] docker rmi 명령어 (0) | 2021.11.25 |