blog_20140209_1_286598 1行 Text
Raw
 1
export ZOO_LOG_DIR="/home/zookeeper/zookeeper345_1/bin"
blog_20140209_2_7397441 3行 Text
Raw
 1
 2
 3
cd /etc/init.d
touch zookeeper1
chmod +x zookeeper1
blog_20140209_3_1650584 10行 Text
Raw
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
#/bin/sh
#chkconfig: 2345 20 80
# description: zookeeper1
case $1 in
start) /home/zookeeper/zookeeper345_1/bin/zkServer.sh start ;;
stop) /home/zookeeper/zookeeper345_1/bin/zkServer.sh stop;;
status) /home/zookeeper/zookeeper345_1/bin/zkServer.sh status;;
restart) /home/zookeeper/zookeeper345_1/bin/zkServer.sh restart;;
*) echo "require start|stop|status|restart" ;;
esac
blog_20140209_4_1443623 1行 Text
Raw
 1
./zkServer.sh start-foreground
blog_20140209_5_7092205 1行 Text
Raw
 1
./zkServer.sh print-cmd