标签:
vim /etc/init.d/zookeeper
chmod +x /etc/init.d/zookeeper
vim /etc/init.d/zookeeper
#!/bin/bash
#Author:hacker1394
#Contacts
#QQ:64324613
#mail:yang.lin.801109@gmail.com
#chkconfig:2345 20 90
#description:zookeeper
#processname:zookeeper
case $1 in
start) su root /opt/Zookeeper/zookeeper/bin/zkServer.sh start;;
stop) su root /opt/Zookeeper/zookeeper/bin/zkServer.sh stop;;
status) su root /opt/Zookeeper/zookeeper/bin/zkServer.sh status;;
restart) su root /opt/Zookeeper/zookeeper/bin/zkServer.sh restart;;
*) echo "require start|stop|status|restart" ;;
esac
chkconfig zookeeper on
service zookeeper restart
标签:
原文地址:http://www.cnblogs.com/hacker1394/p/4568718.html