Bismillah
Prerequisite:
- Java 1.8
Installation:
Download Kafka
wget https://mirrors.estointernet.in/apache/kafka/2.8.1/kafka_2.13-2.8.1.tgz
Extract downloaded zip
tar -xzf kafka_2.13-2.8.1.tgz
Create symlink
ln -s kafka_2.13-2.8.1 kafka
Export
echo "export PATH=$PATH:/root/kafka__2.13-2.8.1/bin" >> ~/.bash_profile
source ~/.bash_profile
Run zookeeper
cd kafka/bin
./zookeeper-server-start.sh -daemon ~/kafka/config/zookeeper.properties
#check if zookeeper successfully running
telnet localhost 2181
# install telnet if not available (optional)
yum -y install telnet-server telnet
- Run kafka
./kafka-server-start.sh -daemon ~/kafka/config/server.properties
#check if kafka successfully running
telnet localhost 9092
Now you are done install kafka on CentOS 7
Optional
Create kafka topic
./kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic my-topic
List created topic
./kafka-topics.sh --zookeeper localhost:2181 --list
Alhamdulillah
Top comments (0)