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


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