zookeeper单机版安装
主机名 | 系统 | IP地址 |
hadoop1 | CentOS 6.5 | 192.168.241.131 |
zookeeper3.4.9 的tar包链接为https://pan.baidu.com/s/1bpqZ9bHgzeri53AWgW2L4Q 提取码:sbp0 永久有效。
开始步骤:
检查jdk环境:为jdk1.8最好,随便什么方式安装都行。
java -version java version "1.8.0_152" Java(TM) SE Runtime Environment (build 1.8.0_152-b16) Java HotSpot(TM) 64-Bit Server VM (build 25.152-b16, mixed mode)
1.解压修改配置文件,注意将zookeeper包解压在/data/soft目录下。
tar -xvf zookeeper-3.4.9.tar.gz mv zookeeper-3.4.9 zookeeper mv conf/zoo_sample.cfg conf/zoo.cfg
目录/data/soft需要自己先创建,至于后面的zookeeper/data里的data目录可以自己创建也行,或者改完后启动服务,系统会自动创建一个data目录。
vim conf/zoo.cfg dataDir=/data/soft/zookeeper/data
2.服务说明,里面有详细的使用参数
sh bin/zkServer.sh ZooKeeper JMX enabled by default Using config: /data/soft/zookeeper/bin/../conf/zoo.cfg Usage: bin/zkServer.sh {start|start-foreground|stop|restart|status|upgrade|print-cmd}
3.启动服务
sh bin/zkServer.sh start ZooKeeper JMX enabled by default Using config: /data/soft/zookeeper/bin/../conf/zoo.cfg Starting zookeeper ... STARTED
查看服务是否启动完成
ps -ef|grep zookeeper root 5851 1 0 13:21 pts/0 00:00:01 /usr/local/jdk1.8.0_152/bin/java -Dzookeeper.log.dir=. -Dzookeeper.root.logger=INFO,CONSOLE -cp /data/soft/zookeeper/bin/../build/classes:/data/soft/zookeeper/bin/../build/lib/*.jar:/data/soft/zookeeper/bin/../lib/slf4j-log4j12-1.6.1.jar:/data/soft/zookeeper/bin/../lib/slf4j-api-1.6.1.jar:/data/soft/zookeeper/bin/../lib/netty-3.10.5.Final.jar:/data/soft/zookeeper/bin/../lib/log4j-1.2.16.jar:/data/soft/zookeeper/bin/../lib/jline-0.9.94.jar:/data/soft/zookeeper/bin/../zookeeper-3.4.9.jar:/data/soft/zookeeper/bin/../src/java/lib/*.jar:/data/soft/zookeeper/bin/../conf:.:/usr/local/jdk1.8.0_152/lib/dt.jar:/usr/local/jdk1.8.0_152/lib/tools.jar -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.local.only=false org.apache.zookeeper.server.quorum.QuorumPeerMain /data/soft/zookeeper/bin/../conf/zoo.cfg root 5944 2594 0 13:24 pts/0 00:00:00 grep zookeeper
查看服务状态,单机版为standalone模式,如下。
sh bin/zkServer.sh status ZooKeeper JMX enabled by default Using config: /data/soft/zookeeper/bin/../conf/zoo.cfg Mode: standalone
可以进入zookeeper的交互模式
sh bin/zkCli.sh Connecting to localhost:2181 2018-04-19 13:23:24,276 [myid:] - INFO [main:Environment@100] - Client environment:zookeeper.version=3.4.9-1757313, built on 08/23/2016 06:50 GMT 2018-04-19 13:23:24,280 [myid:] - INFO [main:Environment@100] - Client environment:host.name=hadoop1 2018-04-19 13:23:24,280 [myid:] - INFO [main:Environment@100] - Client environment:java.version=1.8.0_152 2018-04-19 13:23:24,283 [myid:] - INFO [main:Environment@100] - Client environment:java.vendor=Oracle Corporation 2018-04-19 13:23:24,283 [myid:] - INFO [main:Environment@100] - Client environment:java.home=/usr/local/jdk1.8.0_152/jre 2018-04-19 13:23:24,283 [myid:] - INFO [main:Environment@100] - Client environment:java.class.path=/data/soft/zookeeper/bin/../build/classes:/data/soft/zookeeper/bin/../build/lib/*.jar:/data/soft/zookeeper/bin/../lib/slf4j-log4j12-1.6.1.jar:/data/soft/zookeeper/bin/../lib/slf4j-api-1.6.1.jar:/data/soft/zookeeper/bin/../lib/netty-3.10.5.Final.jar:/data/soft/zookeeper/bin/../lib/log4j-1.2.16.jar:/data/soft/zookeeper/bin/../lib/jline-0.9.94.jar:/data/soft/zookeeper/bin/../zookeeper-3.4.9.jar:/data/soft/zookeeper/bin/../src/java/lib/*.jar:/data/soft/zookeeper/bin/../conf:.:/usr/local/jdk1.8.0_152/lib/dt.jar:/usr/local/jdk1.8.0_152/lib/tools.jar 2018-04-19 13:23:24,283 [myid:] - INFO [main:Environment@100] - Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib 2018-04-19 13:23:24,284 [myid:] - INFO [main:Environment@100] - Client environment:java.io.tmpdir=/tmp 2018-04-19 13:23:24,284 [myid:] - INFO [main:Environment@100] - Client environment:java.compiler=<NA> 2018-04-19 13:23:24,284 [myid:] - INFO [main:Environment@100] - Client environment:os.name=Linux 2018-04-19 13:23:24,284 [myid:] - INFO [main:Environment@100] - Client environment:os.arch=amd64 2018-04-19 13:23:24,284 [myid:] - INFO [main:Environment@100] - Client environment:os.version=2.6.32-431.el6.x86_64 2018-04-19 13:23:24,284 [myid:] - INFO [main:Environment@100] - Client environment:user.name=root 2018-04-19 13:23:24,284 [myid:] - INFO [main:Environment@100] - Client environment:user.home=/root 2018-04-19 13:23:24,284 [myid:] - INFO [main:Environment@100] - Client environment:user.dir=/data/soft/zookeeper 2018-04-19 13:23:24,287 [myid:] - INFO [main:ZooKeeper@438] - Initiating client connection, connectString=localhost:2181 sessionTimeout=30000 watcher=org.apache.zookeeper.ZooKeeperMain$MyWatcher@579bb367 Welcome to ZooKeeper! 2018-04-19 13:23:24,386 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@1032] - Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error) JLine support is enabled 2018-04-19 13:23:24,539 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@876] - Socket connection established to localhost/127.0.0.1:2181, initiating session 2018-04-19 13:23:24,579 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@1299] - Session establishment complete on server localhost/127.0.0.1:2181, sessionid = 0x162dc5a0a620000, negotiated timeout = 30000 WATCHER:: WatchedEvent state:SyncConnected type:None path:null [zk: localhost:2181(CONNECTED) 0] ls / [zookeeper]
4.停止服务
sh bin/zkServer.sh stop ZooKeeper JMX enabled by default Using config: /data/soft/zookeeper/bin/../conf/zoo.cfg Stopping zookeeper ... STOPPED
查看服务是否关闭。
ps -ef|grep zookeeper root 5967 2594 0 13:25 pts/0 00:00:00 grep zookeeper
这是简单的单机版,我尽量做得简单,快速,直接,希望朋友们多多支持!!!
zookeeper单机版安装的更多相关文章
- (转)淘淘商城系列——zookeeper单机版安装
http://blog.csdn.net/yerenyuan_pku/article/details/72717744 这篇文章,我单独来说一下zookeeper如何安装.在实际开发中,zookeep ...
- Zookeeper单机版安装(CentOS 7环境下)
一.环境操作系统和软件版本介绍 1.环境操作系统为CentOS Linux release 7.2.1511 (Core) 可用cat /etc/redhat-release查询 2.软件版本 Zoo ...
- windows下zookeeper单机版安装+dubbo-admin安装注意点
一:zookeeper安装 安转包下载地址:http://www.apache.org/dyn/closer.cgi/zookeeper 复制修改conf下的zoo_sample.cfg为zoo.cf ...
- ZooKeeper 单机版安装和配置
Zookeeper 下载链接:http://mirrors.shu.edu.cn/apache/zookeeper/ #wget https://mirrors.tuna.tsinghua.edu.c ...
- Linux下zookeeper单机版详细安装
Linux下zookeeper单机版详细安装 1.zookeeper简介 ZooKeeper是一个分布式的,开放源码的分布式应用程序协调服务,是Google的Chubby一个开源的实现,是Hadoop ...
- 单机版ZooKeeper的安装教程
之前一直没有时间去整理,现在抽出几分钟时间整理以下,有问题的在评论区留言即可. 前期准备JDK环境(ZK需要jdk进行编译,本文以jdk1.8.0_211为例).Linux系统(本文以Centos7为 ...
- 【ZooKeeper系列】1.ZooKeeper单机版、伪集群和集群环境搭建
ZooKeeper安装模式主要有3种: 单机版(Standalone模式)模式:仅有一个ZooKeeper服务 伪集群模式:单机多个ZooKeeper服务 集群模式:多机多ZooKeeper服务 1 ...
- 【HBase】HBase 单机版安装及使用
HBase介绍 HBase是一个分布式的.面向列的开源数据库,该技术来源于 Fay Chang 所撰写的Google论文“Bigtable:一个结构化数据的分布式存储系统”.就像Bigtable利用了 ...
- hbase单机版安装
hbase单机版安装 1. hbase单机版安装 HBase的安装也有三种模式:单机模式.伪分布模式和完全分布式模式. hbase依赖于Hadoop和Zookeeper. 这里安装的是单机版 ...
随机推荐
- Le Chapitre VIII
J'appris bien vite à mieux connaître cette fleur. Il y avait toujours eu, sur la planète du petit pr ...
- 注意JDBC驱动的版本和JDK的版本是否匹配 JDBC连接Mariadb
Java利用JDBC连接Mariadb的过程和MySQL基本一致. 但是需要注意JDBC驱动的版本和JDK的版本是否匹配: JDBC和JDK版本对应关系 JDBC版本 JDK版本 2.x 1.8 1. ...
- react优化--pureComponent
shouldComponentUpdate的默认渲染 在React Component的生命周期中,shouldComponentUpdate方法,默认返回true,也就意味着就算没有改变props或 ...
- oracle 数据库io 异常,错误代码17002 解决办法
数据库使用一个月了,突然挂掉:错误代码17002 io异常:read timeout 解决: 1.登陆sql命令窗口 [oracle@hostname ~]$ sqlplus /nolog SQL*P ...
- Day1-python基础
python是一门动态解释性的强类型定义语言 python 3.0 ALL IS UNICODE NOW 认识python,了解python的发展史. 1.变量 变量命名规则:变量名只能是字母.数字 ...
- FastDFS分布文件系统Java客户端集成
参考博客:http://blog.csdn.net/xyang81/article/details/52847311 官网Java客户端源代码: https://github.com/happyfis ...
- DML DDL
DDL 1.SQL分为5大类: DDL:数据定义语言 DCL:数据控制语言 DML:数据操纵语言 DTL:数据事务语言 DQL:数据查询语言 2.DDL(data definition languag ...
- 关于QT应用在XP系统上兼容运行的问题
修改兼容XP: 1. 项目属性->配置属性->平台工具集:Visual Studio 2013 - Windows XP (v120_xp) 2. C/C++ 属性-> 代码生成-& ...
- 卷积神经网络(CNN)之一维卷积、二维卷积、三维卷积详解
作者:szx_spark 由于计算机视觉的大红大紫,二维卷积的用处范围最广.因此本文首先介绍二维卷积,之后再介绍一维卷积与三维卷积的具体流程,并描述其各自的具体应用. 1. 二维卷积 图中的输入的数据 ...
- To datafix AR DATE
http://www.cnblogs.com/benio/archive/2012/07/07/2580203.html AR transactions should be created on 6- ...