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