system管理kafka

[root@ajsh-dev006 systemd]# cat /usr/lib/systemd/system/kafka.service 
[Unit]

Description=kafka
[Service]
User=root
LimitNOFILE=65535
LimitNPROC=65535
Environment="JAVA_HOME=/usr/local/jdk/"
ExecStart=/data/kafka/bin/kafka-server-start.sh /data/kafka/config/server.properties
ExecReload=/data/kafka/bin/kafka-server-start.sh /data/kafka/config/server.properties
ExecStop=/bin/kill -s HUP ${MAINPID}
Type=simple
KillMode=process
Restart=on-failure
RestartSec=3s
[Install]
WantedBy=multi-user.target


[Unit]
Description=kafka
[Service]
User=shuli
LimitNOFILE=65535
LimitNPROC=65535
Environment="JAVA_HOME=/usr/local/jdk/"
ExecStart=/data/software/kafka/bin/kafka-server-start.sh /data/software/kafka/config/server.properties
ExecReload=/data/software/kafka/bin/kafka-server-start.sh /data/software/kafka/config/server.properties
ExecStop=/bin/kill -s HUP ${MAINPID}
Type=simple
KillMode=process
Restart=on-failure
RestartSec=3s
[Install]
WantedBy=multi-user.target

posted @ 2023-02-25 14:48  安生丶  阅读(60)  评论(0编辑  收藏  举报