Ubuntu te Kafka install korar jonno ei steps follow korun:
1. Java Install Korun
Kafka Java-er upor run kore, tai age Java install korte hobe:
sudo apt update
sudo apt install default-jdk -y
java -version
2. Kafka Download Korun
Kafka-r latest stable version download korun:
cd ~
wget https://downloads.apache.org/kafka/3.9.0/kafka_2.13-3.9.0.tgz
3. Extract Korun
tar -xzf kafka_2.13-3.9.0.tgz
sudo mv kafka_2.13-3.9.0 /opt/kafka
4. Kafka Start Korun
Prothome ZooKeeper start korun (ekta terminal window-te):
cd /opt/kafka
bin/zookeeper-server-start.sh config/zookeeper.properties
Tarpor Kafka server start korun (arekta terminal window-te):
cd /opt/kafka
bin/kafka-server-start.sh config/server.properties
5. Test Korun
Topic create korun:
bin/kafka-topics.sh --create --topic test-topic --bootstrap-server localhost:9092 --partitions 1 --replication-factor 1
Producer run korun:
bin/kafka-console-producer.sh --topic test-topic --bootstrap-server localhost:9092
Consumer run korun (arekta terminal-e):
bin/kafka-console-consumer.sh --topic test-topic --from-beginning --bootstrap-server localhost:9092
Optional: Systemd Service Banano
Production environment-er jonno systemd service file banate paren jate automatically start hoy.
Kafka successfully install hoyeche kina check korar jonno producer theke message pathiye consumer-e receive hocche kina dekhen. Kono specific step niye question thakle jiggesh korte paren!
মন্তব্যসমূহ
একটি মন্তব্য পোস্ট করুন
আপনার সমস্যাটি কমেন্ট করে আমাদের জানান :-d