[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
标签:bin,管理,system,server,start,65535,kafka,data
From: https://www.cnblogs.com/anslinux/p/17154421.html