system管理zookeeper
[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