zookeeper部署成服务


vi /usr/lib/systemd/system/tomcat.service

cd bin
zkServer.sh ./zkServer.sh {start|start-foreground|stop|restart|status|upgrade|print-cmd}

[Unit]
Description=zookeeper.service
After=network.target
[Service]
Type=forking
Environment=/opt/zookeeper/
#引入JAVA环境变量
Environment=/usr/java/jdk1.7.0_67
ExecStart=/opt/zookeeper/bin/zkServer.sh start
ExecStop=/opt/zookeeper/bin/zkServer.sh stop
ExecReload=/opt/zookeeper/bin/zkServer.sh restart
[Install]
WantedBy=multi-user.target

posted @ 2019-08-02 11:48  小丸子的西瓜梦  阅读(247)  评论(0编辑  收藏  举报