-
Install Kafka
cd /opt curl -O http://www.gtlib.gatech.edu/pub/apache/kafka/0.11.0.0/kafka_2.11-0.11.0.0.tgz tar xvzf kafka_2.11-0.11.0.0.tgz ln -s kafka_2.11-0.11.0.0/ kafka
-
Edit
/usr/lib/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=kafka Group=kafka Environment=JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk 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
-
Edit
/usr/lib/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=kafka Group=kafka Environment=JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk 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
-
Edit
/opt/kafka/config/server.properties
and change thelisteners
propertylisteners=PLAINTEXT://0.0.0.0:9092
-
Reload and start the systemd services
systemctl daemon-reload systemctl start kafka-zookeeper.service systemctl start kafka.service
-
-
Save dyoung522/6f7aab567f70f67030ae4ee0191933c0 to your computer and use it in GitHub Desktop.
kafka installation with systemd
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment