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

zookeeper的开启启动

时间:2018-04-19 11:54:24      阅读:158      评论:0      收藏:0      [点我收藏+]

标签:zookeeper

[root@bb zookeeper]# cd /etc/init.d [root@bb init.d]# cat zookeeper  #!/bin/bash   #chkconfig: 2345 10 90   #description: service zookeeper   export JAVA_HOME=/opt/jdk export   ZOO_LOG_DIR=/home/bb/zookeeper/log  ##zookeeper的配置文件的dataLogDir date >>/tmp/zk.log ZOOKEEPER_HOME=/home/cloud/zookeeper su - cloud ${ZOOKEEPER_HOME}/bin/zkServer.sh      "$1"   echo $1 >>/tmp/zk.log [root@=bb init.d]#  # The number of milliseconds of each tick tickTime=2000 # The number of ticks that the initial  # synchronization phase can take initLimit=10 # The number of ticks that can pass between  # sending a request and getting an acknowledgement syncLimit=5 # the directory where the snapshot is stored. # do not use /tmp for storage, /tmp here is just  # example sakes. dataDir=/home/bb/zookeeper/ dataLogDir=/home/bb/zookeeper/log/ # the port at which the clients will connect clientPort=2182 # the maximum number of client connections. # increase this if you need to handle more clients #maxClientCnxns=60 # # Be sure to read the maintenance section of the  # administrator guide before turning on autopurge. # # http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance # # The number of snapshots to retain in dataDir #autopurge.snapRetainCount=3 # Purge task interval in hours # Set to "0" to disable auto purge feature #autopurge.purgeInterval=1 server.1=172.16.4.26:2888:38888 server.2=172.16.4.27:2888:38888 server.3=172.16.4.28:2888:38888

cd /etc/init.d/

chmod +x zookeeper

chkconfig  -add zookeeper

chkconfig  zookeeper on 

zookeeper的开启启动

标签:zookeeper

原文地址:http://blog.51cto.com/wsxxsl/2105274

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