Configuring Kafka's Systemctl start

View system ctl way configuration

https://www.jianshu.com/p/7fd8b6ea336e

systemctl list-unit-files --type=service|grep kafka

kafka systemctl startup mode command

systemctl start kafka.service

systemctl stop kafka.service

systemctl start zookeeper.service

systemctl stop zookeeper.service

 

Steps

1, modified KafkaStart.sh, zkStart.sh, zkStop.sh, zkStart.sh, the relative path to an absolute path.

2, modify kafkaStart.sh. JMXPORT remove attributes into Kafka-Server-Start.sh

 3, remove the kafkamanager KafkaStart.sh start command to start alone.

4, configure the boot

Note: KafkaStart.sh, zkStart.sh, zkStop.sh, zkStart.sh for fast startup script I have written, is mainly done to make the original life time package.

systemctl enable zookeeper

systemctl  enable  kafka

● zookeeper.service - zookeeper

   Loaded: loaded (/usr/lib/systemd/system/zookeeper.service; static; vendor preset: disabled)

   Active: failed (Result: exit-code) since Tue 2019-11-19 19:06:40 CST; 26s ago

  Process: 96869 ExecStart=/usr/bin/sh /opt/kafka10/zkStart.sh (code=exited, status=127)

 

Related Scripts

Zookeeper

[Unit]

Description=zookeeper

After=network.target

[Service]

Type=forking

ExecStart=/usr/bin/sh /opt/kafka10/zkStar

ExecStop=/usr/bin/sh /opt/kafka10/zkStop.sh

PrivateTmp=true

User=root

Group=root

 

Kafka

[Unit]

Description=kafka

After=network.target

[Service]

Type=forking

ExecStart=/usr/bin/sh /opt/kafka10/kafkaStart.sh

ExecStop=/usr/bin/sh /opt/kafka10/kafkaStop.sh

PrivateTmp=true

User=root

Group=root

Guess you like

Origin www.cnblogs.com/likethis/p/12001525.html