1- Download Zookeeper:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget http://apache.mirror.anlx.net/zookeeper/zookeeper-3.6.1/apache-zookeeper-3.6.1-bin.tar.gz |
2- Extract the archive content:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tar -xvzf apache-zookeeper-3.6.1-bin.tar.gz |
3- Create Zookeeper configuration file from the sample provided:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cp apache-zookeeper-3.6.1-bin/conf/zoo_sample.cfg apache-zookeeper-3.6.1-bin/conf/zoo.cfg |
4- Open the startup script file vim ~/.bashrc and add the following content:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export ZOOKEEPER_HOME=/home/ubuntu/apache-zookeeper-3.6.1-bin | |
export PATH="$PATH:${ZOOKEEPER_HOME}/bin" |
5- activate the new path settings:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source ~/.bashrc |
6- Start zookeeper service:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zkServer.sh start |
7- Download Kafka:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget http://apache.mirror.anlx.net/kafka/2.5.0/kafka_2.12-2.5.0.tgz |
8- Create an installation folder for Kafka:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo mkdir /opt/kafka |
9- Extract the archive content:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo tar -xvzf kafka_2.12-2.5.0.tgz -C /opt/kafka |
10- Open the startup script file vim ~/.bashrc and add the following content:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export KAFKA_HOME=/opt/kafka/kafka_2.12-2.5.0 | |
export PATH="$PATH:${KAFKA_HOME}/bin" |
11- activate the new path settings:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source ~/.bashrc |
12- Create a shortcut to Kafka configuration file:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo ln -s /opt/kafka/kafka_2.12-2.5.0/config/server.properties /etc/kafka.properties |
13- Edit listners parameter within Kafka configuration file i.e.:
listeners=PLAINTEXT://thedevopsnerdworld.com:9092
14- Start Kafka service:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kafka-server-start.sh /etc/kafka.properties |
No comments:
Post a Comment