Linux/Python学习论坛-京峰教育

 找回密码
 立即注册

一键登录:

搜索
热搜: 活动 交友 discuz
查看: 611|回复: 0

Hadoop之zookeeper快速安装

[复制链接]

238

主题

288

帖子

1925

积分

超级版主

Rank: 8Rank: 8

积分
1925
QQ
发表于 2015-3-20 15:12:06 | 显示全部楼层 |阅读模式
查看jdk环境的版本
执行java –version和javac –version命令
[root@node10 ~]# java -version  java version "1.6.0_37"  Java(TM) SE Runtime Environment (build 1.6.0_37-b06)  Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01, mixed mode)
下载并解压zookeeper
cd /opt  tar xzvf zookeeper-3.3.5.tar.gz
重命名zookeeper的配置文件
mv /opt/zookeeper-3.3.5/conf/zoo_sample.cfg  zoo.cfg
编辑修改zoo.cfg
dataDir=/opt/zookeeper-3.3.5/data
创建数据目录:mkdir /opt/zookeeper-3.3.5/data
mkdir  /opt/zookeeper-3.3.5/data
启动zookeeper
/opt/zookeeper-3.3.5/bin/zkServer.sh start
JMX enabled by default
Using config: /opt/zookeeper-3.3.5/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
检查zookeeper进程
ps -ef | grep zookeeper | grep -v grep  oot     29530     1  0 15:39 pts/0    00:00:00 /usr/java/jdk1.6.0_37/bin/java -Dzookeeper.log.dir=. -Dzookeeper.root.logger=INFO,CONSOLE -cp /opt/zookeeper-3.3.5/bin/../build/classes:/opt/zookeeper-3.3.5/bin/../build/lib/*.jar:/opt/zookeeper-3.3.5/bin/../zookeeper-3.3.5.jar:/opt/zookeeper-3.3.5/bin/../lib/log4j-1.2.15.jar:/opt/zookeeper-3.3.5/bin/../lib/jline-0.9.94.jar:/opt/zookeeper-3.3.5/bin/../src/java/lib/*.jar:/opt/zookeeper-3.3.5/bin/../conf:.:/usr/java/jdk1.6.0_37/lib/dt.jar:/usr/java/jdk1.6.0_37/lib/tools.jar -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.local.only=false org.apache.zookeeper.server.quorum.QuorumPeerMain /opt/zookeeper-3.3.5/bin/../conf/zoo.cfg
还可以用以下方法检测是否启动成功
/opt/zookeeper-3.4.3/bin/zkCli.sh 或 echo stat|nc localhost 2181
停止zookeeper
kill -9  29530

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|京峰教育,只为有梦想的人 ( 京ICP备15013173号 )

GMT+8, 2019-7-17 12:39 , Processed in 0.058243 second(s), 13 queries , Apc On.

快速回复 返回顶部 返回列表