Ad Code

Ticker

6/recent/ticker-posts

2 Exclusive Ways to Start Kafka Services

2 Ways to start Kafka Services

The Kafka services start or stop you can do in two ways. One is from Systemd service, and the second option is as Sudo (root) user.

How to start/stop Kafka service

Here are exclusive ways. With these, you can start or stop Kafka services. Those are Systemd and Systemctl.

1. Systemd service

Those who are used to managing servers as Linux-based services with a tool like a Puppet may be familiar with installing service unit files and can likely use that knowledge to create running instances with systemd. 

For those not familiar with it: it initializes and maintains components throughout the system. One common way to define ZooKeeper and Kafka is as unit files used by systemd.

Commands

The first command starts the service, and the second command stops the service.

... [Service] ...

ExecStart=/opt/kafkainaction/bin/zookeeper-server-start.sh
ExecStop= /opt/kafkainaction/bin/zookeeper-server-stop.sh



2. Systemctl by Sudo (root) user

The root user can start or stop the Kafka services. This is more like front-end processing. This way of executing is called systemctl. 

Commands

The first command starts the Zookeeper and the second one starts Kafka.
  • $sudo systemctl start zookeeper 
  • $sudo systemctl start kafka

Related

Post a Comment

0 Comments