码迷,mamicode.com
首页 > 其他好文 > 详细

zookeeper 开机启动

时间:2015-06-11 12:51:13      阅读:131      评论:0      收藏:0      [点我收藏+]

标签:

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

zookeeper 开机启动

标签:

原文地址:http://www.cnblogs.com/hacker1394/p/4568718.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!