kafka Installation

  • date 31st March, 2021 |
  • by Prwatech |
  • 0 Comments

Prerequisites

Hardware requirements:

Local machine

RAM 8 GB or above

Software requirements

VMware Workstation , Version : 16 pro

Download the software from given link :- https://prwatech.in/blog/software-installation/vmware-workstation-installation/

Ubuntu , Version:18.04 :- https://prwatech.in/blog/software-installation/vmware-workstation-installation/

Programming languages: Linux

Learn Linux :  https://prwatech.in/blog/linux/linux-architecture/

1.Install java

Command: $sudo apt-get install openjdk-8-jdk

2. Check the java version

3. Download  kafka from the following link using wget

https://www.apache.org/dyn/closer.cgi?path=/kafka/2.7.0/kafka_2.13-2.7.0.tgz

4. Go to the directory where kafka has downloaded and untar the file

5. Run the following command to start all services in the correct order

bin/zookeeper-server-start.sh config/zookeeper.properties

6. Open new terminal and write the following code

bin/kafka-server-start.sh config/server.properties

Once all the services are successfully launched, there will be a basic Kafka environment running and ready to use.

7. Open another new terminal and run the following command

bin/kafka-topics.sh –create –topic quickstart-events –bootstrap-server localhost:9092

8. In the same terminal add the below commands

bin/kafka-topics.sh –describe –topic quickstart-events –bootstrap-server localhost:9092

9. Now write some events using the following command:

bin/kafka-console-producer.sh –topic quickstart-events –bootstrap-server localhost:9092

10. Now read the events you have entered by writing the following command:

bin/kafka-console-consumer.sh –topic quickstart-events –from-beginning –bootstrap-server localhost:9092

0
0

Quick Support

image image