文档章节

zookeeper下载安装

Mr_Tea伯奕
 Mr_Tea伯奕
发布于 2016/06/27 11:19
字数 1199
阅读 644
收藏 3

1、安装包地址

http://www.apache.org/dyn/closer.cgi/zookeeper/

 

 

点击后找到地址http://mirror.bit.edu.cn/apache/zookeeper/zookeeper-3.5.1-alpha/

所以地址安装包地址为

http://mirror.bit.edu.cn/apache/zookeeper/zookeeper-3.5.1-alpha/zookeeper-3.5.1-alpha.tar.gz

右键 zookeeper-3.5.1-alpha.tar.gz 复制连接地址得到的。

2、下载安装

#wget http://mirror.bit.edu.cn/apache/zookeeper/zookeeper-3.5.1-alpha/zookeeper-3.5.1-alpha.tar.gz

 

2.2 安装

# tar -zxvf zookeeper-3.5.1-alpha.tar.gz

2.3 把放到usr/local/ 目录去

# mv zookeeper-3.5.1-alpha /usr/local

2.4修改配置(/usr/local/zookeeper-3.5.1-alpha/conf/目录下)

先备份文件 

# cp zoo_sample.cfg  zoo.cfg

修改配置

dataDir=/usr/local/zookeeper-3.5.1

3、启动 zookeeper(在/usr/local/zookeeper-3.5.1/bin/下)

[root@iZ25av9xi4hZ bin]# ./zkServer.sh start
ZooKeeper JMX enabled by default
/usr/bin/java
Using config: /usr/local/zookeeper-3.5.1/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
[root@iZ25av9xi4hZ bin]# 

启动成功了

3.1查看下状态

[root@iZ25av9xi4hZ bin]# ./zkServer.sh status
ZooKeeper JMX enabled by default
/usr/bin/java
Using config: /usr/local/zookeeper-3.5.1/bin/../conf/zoo.cfg
Client port found: 2181. Client address: localhost.
Mode: standalone
[root@iZ25av9xi4hZ bin]# 

在日志看下(/usr/local/zookeeper-3.5.1-alpha/logs/目录下)

#tail -f zookeeper-root-server-iZ25av9xi4hZ.out 

 

tail: zookeeper-root-server-iZ25av9xi4hZ.out: file truncated
2016-06-27 11:13:43,270 [myid:] - INFO  [main:QuorumPeerConfig@114] - Reading configuration from: /usr/local/zookeeper-3.5.1/bin/../conf/zoo.cfg
2016-06-27 11:13:43,276 [myid:] - INFO  [main:QuorumPeerConfig@316] - clientPortAddress is 0.0.0.0/0.0.0.0:2181
2016-06-27 11:13:43,276 [myid:] - INFO  [main:QuorumPeerConfig@320] - secureClientPort is not set
2016-06-27 11:13:43,279 [myid:] - INFO  [main:DatadirCleanupManager@78] - autopurge.snapRetainCount set to 3
2016-06-27 11:13:43,280 [myid:] - INFO  [main:DatadirCleanupManager@79] - autopurge.purgeInterval set to 0
2016-06-27 11:13:43,280 [myid:] - INFO  [main:DatadirCleanupManager@101] - Purge task is not scheduled.
2016-06-27 11:13:43,280 [myid:] - WARN  [main:QuorumPeerMain@122] - Either no config or no quorum defined in config, running  in standalone mode
2016-06-27 11:13:43,296 [myid:] - INFO  [main:QuorumPeerConfig@114] - Reading configuration from: /usr/local/zookeeper-3.5.1/bin/../conf/zoo.cfg
2016-06-27 11:13:43,297 [myid:] - INFO  [main:QuorumPeerConfig@316] - clientPortAddress is 0.0.0.0/0.0.0.0:2181
2016-06-27 11:13:43,297 [myid:] - INFO  [main:QuorumPeerConfig@320] - secureClientPort is not set
2016-06-27 11:13:43,297 [myid:] - INFO  [main:ZooKeeperServerMain@113] - Starting server
2016-06-27 11:13:43,331 [myid:] - INFO  [main:Environment@109] - Server environment:zookeeper.version=3.5.1-alpha-1693007, built on 07/28/2015 07:19 GMT
2016-06-27 11:13:43,331 [myid:] - INFO  [main:Environment@109] - Server environment:host.name=iZ25av9xi4hZ
2016-06-27 11:13:43,332 [myid:] - INFO  [main:Environment@109] - Server environment:java.version=1.8.0_91
2016-06-27 11:13:43,332 [myid:] - INFO  [main:Environment@109] - Server environment:java.vendor=Oracle Corporation
2016-06-27 11:13:43,332 [myid:] - INFO  [main:Environment@109] - Server environment:java.home=/usr/java/jdk1.8.0_91/jre
2016-06-27 11:13:43,337 [myid:] - INFO  [main:Environment@109] - Server environment:java.class.path=/usr/local/zookeeper-3.5.1/bin/../build/classes:/usr/local/zookeeper-3.5.1/bin/../build/lib/*.jar:/usr/local/zookeeper-3.5.1/bin/../lib/slf4j-log4j12-1.7.5.jar:/usr/local/zookeeper-3.5.1/bin/../lib/slf4j-api-1.7.5.jar:/usr/local/zookeeper-3.5.1/bin/../lib/servlet-api-2.5-20081211.jar:/usr/local/zookeeper-3.5.1/bin/../lib/netty-3.7.0.Final.jar:/usr/local/zookeeper-3.5.1/bin/../lib/log4j-1.2.16.jar:/usr/local/zookeeper-3.5.1/bin/../lib/jline-2.11.jar:/usr/local/zookeeper-3.5.1/bin/../lib/jetty-util-6.1.26.jar:/usr/local/zookeeper-3.5.1/bin/../lib/jetty-6.1.26.jar:/usr/local/zookeeper-3.5.1/bin/../lib/javacc.jar:/usr/local/zookeeper-3.5.1/bin/../lib/jackson-mapper-asl-1.9.11.jar:/usr/local/zookeeper-3.5.1/bin/../lib/jackson-core-asl-1.9.11.jar:/usr/local/zookeeper-3.5.1/bin/../lib/commons-cli-1.2.jar:/usr/local/zookeeper-3.5.1/bin/../zookeeper-3.5.1-alpha.jar:/usr/local/zookeeper-3.5.1/bin/../src/java/lib/*.jar:/usr/local/zookeeper-3.5.1/bin/../conf:
2016-06-27 11:13:43,337 [myid:] - INFO  [main:Environment@109] - Server environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
2016-06-27 11:13:43,337 [myid:] - INFO  [main:Environment@109] - Server environment:java.io.tmpdir=/tmp
2016-06-27 11:13:43,338 [myid:] - INFO  [main:Environment@109] - Server environment:java.compiler=<NA>
2016-06-27 11:13:43,338 [myid:] - INFO  [main:Environment@109] - Server environment:os.name=Linux
2016-06-27 11:13:43,338 [myid:] - INFO  [main:Environment@109] - Server environment:os.arch=amd64
2016-06-27 11:13:43,338 [myid:] - INFO  [main:Environment@109] - Server environment:os.version=2.6.32-431.23.3.el6.x86_64
2016-06-27 11:13:43,339 [myid:] - INFO  [main:Environment@109] - Server environment:user.name=root
2016-06-27 11:13:43,339 [myid:] - INFO  [main:Environment@109] - Server environment:user.home=/root
2016-06-27 11:13:43,340 [myid:] - INFO  [main:Environment@109] - Server environment:user.dir=/usr/local/zookeeper-3.5.1/bin
2016-06-27 11:13:43,340 [myid:] - INFO  [main:Environment@109] - Server environment:os.memory.free=12MB
2016-06-27 11:13:43,340 [myid:] - INFO  [main:Environment@109] - Server environment:os.memory.max=966MB
2016-06-27 11:13:43,341 [myid:] - INFO  [main:Environment@109] - Server environment:os.memory.total=15MB
2016-06-27 11:13:43,345 [myid:] - INFO  [main:ZooKeeperServer@858] - minSessionTimeout set to 4000
2016-06-27 11:13:43,345 [myid:] - INFO  [main:ZooKeeperServer@867] - maxSessionTimeout set to 40000
2016-06-27 11:13:43,345 [myid:] - INFO  [main:ZooKeeperServer@156] - Created server with tickTime 2000 minSessionTimeout 4000 maxSessionTimeout 40000 datadir /usr/local/zookeeper-3.5.1/version-2 snapdir /usr/local/zookeeper-3.5.1/version-2
2016-06-27 11:13:43,375 [myid:] - INFO  [main:Slf4jLog@67] - Logging to org.slf4j.impl.Log4jLoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog
2016-06-27 11:13:43,405 [myid:] - INFO  [main:Slf4jLog@67] - jetty-6.1.26
2016-06-27 11:13:43,487 [myid:] - INFO  [main:Slf4jLog@67] - Started SelectChannelConnector@0.0.0.0:8080
2016-06-27 11:13:43,494 [myid:] - INFO  [main:JettyAdminServer@105] - Started AdminServer on address 0.0.0.0, port 8080 and command URL /commands
2016-06-27 11:13:43,511 [myid:] - INFO  [main:NIOServerCnxnFactory@673] - Configuring NIO connection handler with 10s sessionless connection timeout, 1 selector thread(s), 2 worker threads, and 64 kB direct buffers.
2016-06-27 11:13:43,520 [myid:] - INFO  [main:NIOServerCnxnFactory@686] - binding to port 0.0.0.0/0.0.0.0:2181
2016-06-27 11:13:43,548 [myid:] - INFO  [main:FileSnap@83] - Reading snapshot /usr/local/zookeeper-3.5.1/version-2/snapshot.0
2016-06-27 11:13:43,555 [myid:] - INFO  [main:FileTxnSnapLog@298] - Snapshotting: 0x0 to /usr/local/zookeeper-3.5.1/version-2/snapshot.0
2016-06-27 11:13:43,578 [myid:] - INFO  [main:ContainerManager@64] - Using checkIntervalMs=60000 maxPerMinute=10000
2016-06-27 11:15:02,676 [myid:] - INFO  [NIOServerCxnFactory.AcceptThread:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory$AcceptThread@296] - Accepted socket connection from /127.0.0.1:58676
2016-06-27 11:15:02,794 [myid:] - INFO  [NIOWorkerThread-1:NIOServerCnxn@485] - Processing srvr command from /127.0.0.1:58676
2016-06-27 11:15:02,798 [myid:] - INFO  [NIOWorkerThread-1:NIOServerCnxn@606] - Closed socket connection for client /127.0.0.1:58676 (no session established for client)

 

端口看下

[root@iZ25av9xi4hZ bin]# telnet 127.0.0.1 2181
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.

 

© 著作权归作者所有

Mr_Tea伯奕
粉丝 5
博文 218
码字总数 51920
作品 0
朝阳
其他
私信 提问
ZooKeeper学习笔记-CentOS7.5安装ZooKeeper

ZooKeeper学习笔记-CentOS7.5安装ZooKeeper 安装java环境 安装ZooKeeper 安装java环境 你ZooKeeper的运行需要java环境。 下载 如未安装java环境,下载最新版本的java: https://www.oracle.c...

Super_RD
2018/12/04
0
0
zookeeper-3.5.5 集群安装 , php7.2 - zookeeper扩展安装

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。 https://blog.csdn.net/chaoluo001/article/details/93191694 这两天在捣腾zookeeper 分布式...

超罗
06/21
0
0
ZooKeeper下载安装(Windows版本)

官网下载 进入Apache ZooKeeper官方网站进行下载,https://zookeeper.apache.org/releases.html 这里我们选择zookeeper-3.4.12版本进行下载 百度网盘下载 链接:https://pan.baidu.com/s/1HO...

ring300
2018/05/25
0
0
zookeeper集群的安装配置

zookeeper介绍 ZooKeeper是一个分布式的,开放源码的分布式应用程序协调服务,是Google的Chubby一个开源的实现,是Hadoop和Hbase的重要组件。它是一个为分布式应用提供一致性服务的软件,提供...

wIw
2015/07/12
813
0
Zookeeper在windows下的单机模式安装

安装jdk 安装Zookeeper. 在官网http://zookeeper.apache.org/下载zookeeper.我下载的是zookeeper-3.4.12版本。 解压zookeeper-3.4.6至D:machinezookeeper-3.4.12. 在D:machine 新建data及log......

快乐的小火柴
2018/08/22
46
0

没有更多内容

加载失败,请刷新页面

加载更多

MongoDB系列-在复制集(replication)以及分片(Shard)中创建索引

关注我,可以获取最新知识、经典面试题以及微服务技术分享   在使用MongoDB时,在创建索引会涉及到在复制集(replication)以及分片(Shard)中创建,为了最大限度地减少构建索引的影响,在副本...

ccww_
19分钟前
16
0
SAP HANA数据库multi container模式JDBC链接connection refused

报错如下信息 com.sap.db.jdbc.exceptions.JDBCDriverException: SAP DBTech JDBC: Cannot connect to jdbc:sap://xxx.xxx.xxx.xxx:30015 [Cannot connect to host xxx.xxx.xxx.xxx:30015 [C......

flash胜龙
44分钟前
31
0
c++ 虚基类

c++ 虚基类 p556

天王盖地虎626
50分钟前
83
0
k8s删除Terminating状态的命名空间

背景: 我们都知道在k8s中namespace有两种常见的状态,即Active和Terminating状态,其中后者一般会比较少见,只有当对应的命名空间下还存在运行的资源,但是该命名空间被删除时才会出现所谓的...

Andy-xu
今天
72
0
seata源码阅读笔记

seata源码阅读笔记 本文没有seata的使用方法,怎么使用seata可以参考官方示例,详细的很。 本文基于v0.8.0版本,本文没贴代码。 seata中的三个重要部分: TC:事务协调器,维护全局事务和分支...

东都大狼狗
今天
44
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部