Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
cd /opt
wget http://apache-mirror.rbc.ru/pub/apache/kafka/0.10.1.0/kafka_2.11-0.10.1.0.tgz
tar xvzf kafka_2.11-0.10.1.0.tgz
ln -s kafka_2.11-0.10.1.0/ kafka
vi /etc/systemd/system/kafka-zookeeper.service
[Unit]
Description=Apache Zookeeper server (Kafka)
Documentation=http://zookeeper.apache.org
Requires=network.target remote-fs.target
After=network.target remote-fs.target
[Service]
Type=simple
User=nano
Group=nano
Environment=JAVA_HOME=/usr/java/jdk1.8.0_102
ExecStart=/opt/kafka/bin/zookeeper-server-start.sh /opt/kafka/config/zookeeper.properties
ExecStop=/opt/kafka/bin/zookeeper-server-stop.sh
[Install]
WantedBy=multi-user.target
vi /etc/systemd/system/kafka.service
[Unit]
Description=Apache Kafka server (broker)
Documentation=http://kafka.apache.org/documentation.html
Requires=network.target remote-fs.target
After=network.target remote-fs.target kafka-zookeeper.service
[Service]
Type=simple
User=nano
Group=nano
Environment=JAVA_HOME=/usr/java/jdk1.8.0_102
ExecStart=/opt/kafka/bin/kafka-server-start.sh /opt/kafka/config/server.properties
ExecStop=/opt/kafka/bin/kafka-server-stop.sh
[Install]
WantedBy=multi-user.target
vi kafka/config/server.properties
edit listeners propertie
listeners=PLAINTEXT://192.168.13.133:9092
systemctl daemon-reload
systemctl start kafka-zookeeper.service
systemctl start kafka.service
@stiv-yakovenko

This comment has been minimized.

Copy link

commented Aug 9, 2018

very helpful, thank you so much!

@AndresPineros

This comment has been minimized.

Copy link

commented Feb 5, 2019

Thanks :)

@moiz01

This comment has been minimized.

Copy link

commented May 5, 2019

thank you

@bugster86

This comment has been minimized.

Copy link

commented May 8, 2019

Thank you!!

@arbabkhalil

This comment has been minimized.

Copy link

commented Jun 13, 2019

Thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.