赞
踩
原帖地址: http://blog.csdn.net/nsrainbow/article/details/42013293 最新课程请关注原作者博客
yum install zookeeper -y
都安装 zookeeper-server
sudo yum install zookeeper-server -y
$ sudo service zookeeper-server init --myid=1
$ sudo service zookeeper-server start
JMX enabled by default
Using config: /etc/zookeeper/conf/zoo.cfg
Starting zookeeper ... STARTED
在 host2 上启动zookeeper
$ sudo service zookeeper-server init --myid=2
$ sudo service zookeeper-server start
JMX enabled by default
Using config: /etc/zookeeper/conf/zoo.cfg
Starting zookeeper ... STARTED
- $ netstat -tpnl | grep 2181
- tcp 0 0 :::2181 :::* LISTEN 5477/java
用client端测试一下
zookeeper-client -server host1:2181
在两台机子上都编辑 /etc/zookeeper/conf/zoo.cfg 文件
tickTime=2000
dataDir=/var/lib/zookeeper/
clientPort=2181
initLimit=5
syncLimit=2
server.1=host1:2888:3888
server.2=host2:2888:3888
hadoop在启动的时候会自动去找zookeeper的2181端口,如果没有就启动不起来
yum install hadoop-yarn-nodemanager hadoop-hdfs-datanode hadoop-mapreduce -y
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。