zookeeper搭建
2014-11-17 10:09
288 查看
1、解压
2、修改配置文件
3、修改myid
4、启动
5、查看
tar -zxf zookeeper-3.4.6.tar.gz
2、修改配置文件
[root@cluster3 hadoop]# cd zookeeper-3.4.6/conf/ [root@cluster3 conf]# cp zoo_sample.cfg zoo.cfg [root@cluster3 conf]# vi zoo.cfg # The number of milliseconds of each tick tickTime=2000 # The number of ticks that the initial # synchronization phase can take initLimit=10 server.1=cluster1:2888:3888 # 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=/usr/local/hadoop/zookeeper-3.4.6/data dataLogDir=/usr/local/hadoop/zookeeper-3.4.6/logs # the port at which the clients will connect clientPort=2181 server.4=cluster4:2888:3888 server.5=cluster5:2888:3888 # 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 "zoo.cfg" 30L, 1011C written
3、修改myid
[root@cluster3 conf]# cd /usr/local/hadoop/zookeeper-3.4.6/data [root@cluster3 data]# vi myid 3 [root@cluster3 conf]# scp /usr/local/hadoop/zookeeper-3.4.6 root@cluster4:/usr/local/hadoop/ [root@cluster3 data]# scp /usr/local/hadoop/zookeeper-3.4.6 root@cluster5:/usr/local/hadoop/ [root@cluster4 conf]# cd /usr/local/hadoop/zookeeper-3.4.6/data [root@cluster4 data]# vi myid 4 [root@cluster5 conf]# cd /usr/local/hadoop/zookeeper-3.4.6/data [root@cluster5 data]# vi myid 5
4、启动
在cluster4、cluster5启动 [root@cluster4 bin]# ./zkServer.sh start JMX enabled by default Using config: /usr/local/hadoop/zookeeper-3.4.6/bin/../conf/zoo.cfg Starting zookeeper ... STARTED [root@cluster5 bin]# ./zkServer.sh start JMX enabled by default Using config: /usr/local/hadoop/zookeeper-3.4.6/bin/../conf/zoo.cfg Starting zookeeper ... STARTED
5、查看
[root@cluster5 bin]# ./zkServer.sh status JMX enabled by default Using config: /usr/local/hadoop/zookeeper-3.4.6/bin/../conf/zoo.cfg Error contacting service. It is probably not running. 这个可能是脚本问题,暂时不管。
相关文章推荐
- solr +zookeeper+tomcat 集群搭建
- zookeeper集群搭建 windows
- dubbo+zookeeper+springmvc搭建实例教程
- Hadoop生态系统搭建(5)—— 分布式协同服务框架 Zookeeper 的安装部署与测试
- Dubbo+zookeeper入门示例搭建
- Spark集群基于Zookeeper的HA搭建部署笔记
- HDFS HA【QJM】集群搭建以及使用Zookeeper集群进行故障转移
- Zookeeper简介及单机、集群模式搭建
- Kafka(自带的zookeeper)集群搭建详细步骤
- Hadoop+Spark+Zookeeper 集群搭建
- Dubbo-Admin管理平台和Zookeeper注册中心的搭建
- 本机搭建zookeeper集群
- Zookeeper集群搭建的时遇到Connection refused
- 从头开始搭建一个dubbo+zookeeper平台
- Win7下单机版的伪分布式solrCloud环境搭建Tomcat+solr+zookeeper【转】
- zookeeper activemq 搭建
- docker 土法制作zookeeper镜像 并且搭建集群 基于centos7.2
- [dubbo实战] dubbo+zookeeper伪集群搭建 (转)
- Hadoop 2.4.0+zookeeper3.4.6+hbase0.98.3分布式集群搭建
- zookeeper+kafka集群搭建