Install Kafka Cluster on Ubuntu


1. Spin up Ubuntu server on AWS
2. Connect using putty.(port 22)
3.Check java version  java -version. if not install than do below:

sudo apt-get update

sudo add-apt-repository ppa:webupd8team/java

sudo apt-get update

sudo apt-get install oracle-java8-installer

# Managing java
sudo update-alternatives --config java

Setting the JAVA_HOME Environment Variable

sudo update-alternatives --config java

sudo vi /etc/environment

# INSERT
JAVA_HOME="/usr/lib/jvm/java-8-oracle"

source /etc/environment

echo $JAVA_HOME


4. Download Kafka and unzip

# wget http://mirror.vorboss.net/apache/kafka/2.2.0/kafka_2.12-2.2.0.tgz

UNTAR kafka

tar -xvf <kafka_2.12-2.2.0.tgz>

Run below command to see everything works fine

bin/kafka-topics.sh

now add bin directory to PATH

$ pwd
/home/ubuntu/kafka_2.12-2.2.0/bin
sudo vi ~/.bash_profile and put

export PATH="/home/ubuntu/kafka_2.12-2.2.0/bin"

OR change the bashrc file

-------------

make chnages for zookeeper

mkdir data/zookeeper folder in kafka home


go to vi config/zookeeper.properties

make changes as below

dataDir=/home/ubuntu/kafka_2.12-2.2.0/data/zookeeper

save exit

start zookerper

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


SUCCESS if you get below

[2019-03-28 14:15:36,954] INFO binding to port 0.0.0.0/0.0.0.0:2181 (org.apache.zookeeper.server.NIOServerCnxnFactory)

Comments

Popular posts from this blog

Qlik Sense Important Links

Cloud Architecture Notes

AWS Rout53 NS records do not match with whois dns records OR Your site NOT working with registered domain name? Check this...