标签:style color io ar 文件 数据 art div 问题
主机名 | IP地址 | JDK | ZooKeeper | myid |
c1 | 192.168.58.129 | 1.7.0_11 | server.1 | 1 |
c2 | 192.168.58.130 | 1.7.0_11 | server.2 | 2 |
c3 | 192.168.58131 | 1.870_11 | server.3 | 3 |
tar -zxvf zookeeper-3.4.6.tar.gz
将zookeeper-3.4.5/conf目录下面的 zoo_sample.cfg修改为zoo.cfg,配置文件内容如下所示:
tickTime=2000 initLimit=10 syncLimit=5 dataDir=/usr/local/cdh/zookeeper/data/ dataLogDir=/usr/local/cdh/zookeeper/dataLog/ clientPort=2181 server.1=c1:2888:3888 server.2=c2:2888:3888 server.3=c3:2888:3888
需要创建数据文件夹和日志文件夹
cd /usr/local/cdh/zookeeper/
mkdir data
mkdir dataLog
主机名 | IP地址 | JDK | ZooKeeper | myid |
c1 | 192.168.58.129 | 1.7.0_11 | server.1 | 1 |
c2 | 192.168.58.130 | 1.7.0_11 | server.2 | 2 |
c3 | 192.168.58131 | 1.870_11 | server.3 | 3 |
vim myid
1
:wq
hadoop@slave-01:~ bin/zkServer.sh start hadoop@slave-02:~ bin/zkServer.sh start hadoop@slave-03:~ bin/zkServer.sh start
bin/zkCli.sh -server c1:2181
hadoop@c1:~ sh bin/zkServer.sh status JMX enabled by default Using config: /root/zookeeper/bin/../conf/zoo.cfg Mode: leader hadoop@c2:~ sh bin/zkServer.sh status JMX enabled by default Using config: /root/zookeeper/bin/../conf/zoo.cfg Mode: follower hadoop@c3:~ sh bin/zkServer.sh status JMX enabled by default Using config: /root/zookeeper/bin/../conf/zoo.cfg Mode: leader
zookeeper-3.4.5-cdh5.1.0 完全分布式安装
标签:style color io ar 文件 数据 art div 问题
原文地址:http://blog.csdn.net/jameshadoop/article/details/39275911