[root@ajsh-dev006 systemd]# cat /usr/lib/systemd/system/zk.service
[Unit]
Description=zookeeper.service
After=network.target
[Service]
User=root
Group=root
LimitNOFILE=65535
LimitNPROC=65535
Type=forking
Environment=JAVA_HOME=/usr/local/jdk/
ExecStart=/data/zookeeper/bin/zkServer.sh start
ExecStop=/data/zookeeper/bin/zkServer.sh stop
ExecReload=/data/zookeeper/bin/zkServer.sh restart
Restart=on-failure
RestartSec=3s
[Install]
WantedBy=multi-user.target
标签:bin,管理,zookeeper,system,sh,zkServer,data
From: https://www.cnblogs.com/anslinux/p/17154425.html