"No one is harder on a talented person than the person themselves" - Linda Wilkinson ; "Trust your guts and don't follow the herd" ; "Validate direction not destination" ;

June 08, 2019

Day #259 - Setting up Kafka on my Ubuntu - Big Data Setup - Part IV

Finally Setting up all Big Data Tools in my Linux Setup. Rough Steps and my reference notes


--Linux Pre-requisites
sudo apt-get install nano
sudo apt-get install openjdk-8-jdk
sudo update-alternatives --config java
sudo apt-get install curl
http://apache.org/dist/kafka/2.1.1/
Extracted kafka to /home/kafka/kafka folder under administrator
--Reference Steps https://www.digitalocean.com/community/tutorials/how-to-install-apache-kafka-on-ubuntu-18-04
--Additional Steps, Few Customized
sudo nano /etc/systemd/system/zookeeper.service
[Unit]
Requires=network.target remote-fs target
After=network.target remote-fs.target
[Service]
Type=simple
User=administrator
ExecStart=/home/administrator/kafka/kafka/bin/zookeeper-server-start.sh /home/a$
ExecStop=/home/administrator/kafka/kafka/bin/zookeeper-server-stop.sh
Restart=on-abnormal
[Install]
WantedBy=multi-user.target
sudo nano /etc/systemd/system/kafka.service
[Unit]
Requires=zookeeper.service
After=zookeeper.service
[Service]
Type=simple
User=administrator
ExecStart=/bin/sh -c '/home/administrator/kafka/kafka/bin/kafka-server-start.sh$
ExecStop=/home/administrator/kafka/kafka/bin/kafka-server-stop.sh
Restart=on-abnormal
[Install]
WantedBy=multi-user.target
Kafka test Examples
=====================
Step 1 - ~/kafka/kafka/bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic TutorialTopic
Step 2 - echo "Hello,World" | ~/kafka/kafka/bin/kafka-console-producer.sh --broker-list localhost:9092 --topic TutorialTopic > /dev/null
Step 3 - ~/kafka/kafka/bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic TutorialTopic –from-beginning


Happy Data Thinking!!!!

No comments: