Zookeeper: configuring on centos7
thispassage is referenced, appreciated.
ZooKeeper installation:
- Download from this site
- Install java-sdk-v1.6
- Configure the zoo.cfg following the zoo.template.cfg in conf/
add the parameters according to the link and the first site stated. (except the datadir part)
Add datadir and datalog as the referenced said - Add a file named myid in the datadir and insert order of machine startring from 1 to 255 and nothing else (e.g. server.1=10.0.2.50:2888:3888)
- Start by bin/zkServer.sh start (|stop|start-foreground|status)
- install the same thing as stated in 1~4, but start bin/zkCli.sh -server 10.0.2.50:2181
- Done
to share my_data between clients..
create /zk_test my_data
get /zk_test
delete /zk_test
wondering what zk is?
quote
- ZooKeeper is a high-performance coordination service for distributed applications. It exposes common services - such as naming, configuration management, synchronization, and group services - in a simple interface so you don't have to write them from scratch. You can use it off-the-shelf to implement consensus, group management, leader election, and presence protocols. And you can build on it for your own, specific needs.
!quote
Some notes
- If need to send info from server to clients, the server can also login zookeeper as a client, and add znodes.
- Using daemontools to supervise zookeeper’s server. Not sure..
- Check server’s status and other info: usage: echo conf|nc localhost 2181
conf
New in 3.3.0: Print details about serving configuration.
cons
New in 3.3.0: List full connection/session details for all clients connected to this server. Includes information on numbers of packets received/sent, session id, operation latencies, last operation performed, etc...
crst
New in 3.3.0: Reset connection/session statistics for all connections.
dump
Lists the outstanding sessions and ephemeral nodes. This only works on the leader.
envi
Print details about serving environment
ruok
Tests if server is running in a non-error state. The server will respond with imok if it is running. Otherwise it will not respond at all.
A response of "imok" does not necessarily indicate that the server has joined the quorum, just that the server process is active and bound to the specified client port. Use "stat" for details on state wrt quorum and client connection information.
srst
Reset server statistics.
srvr
New in 3.3.0: Lists full details for the server.
stat
Lists brief details for the server and connected clients.
wchs
New in 3.3.0: Lists brief information on watches for the server.
wchc
New in 3.3.0: Lists detailed information on watches for the server, by session. This outputs a list of sessions(connections) with associated watches (paths). Note, depending on the number of watches this operation may be expensive (ie impact server performance), use it carefully.
wchp
New in 3.3.0: Lists detailed information on watches for the server, by path. This outputs a list of paths (znodes) with associated sessions. Note, depending on the number of watches this operation may be expensive (ie impact server performance), use it carefully.
Zookeeper: configuring on centos7的更多相关文章
- 精简总结redis/rabbitmq/zookeeper在linux centos7上的安装
因为本博主之前已经写过了相关的一些安装及集群,可以参考前面的记录,但是由于博最近更换了VM14和centos7,为了适应这些环境,所以后续会逐渐重新搭建相关环境,并对之前的安装思路进一步精简梳理,以期 ...
- ZooKeeper教程(一)----Centos7下安装ZooKeeper(单机版)
1.下载源码 官网下载地址: http://mirrors.hust.edu.cn/apache/zookeeper/ 选择最新的版本进行下载 这里选择3.4.10进行下载: wget http:// ...
- Zookeeper单机版安装(CentOS 7环境下)
一.环境操作系统和软件版本介绍 1.环境操作系统为CentOS Linux release 7.2.1511 (Core) 可用cat /etc/redhat-release查询 2.软件版本 Zoo ...
- Hadoop HA(高可用) 详细安装步骤
什么是HA? HA是High Availability的简写,即高可用,指当当前工作中的机器宕机后,会自动处理这个异常,并将工作无缝地转移到其他备用机器上去,以来保证服务的高可用.(简言之,有两台机器 ...
- 在 CentOS7 上部署 zookeeper 服务
在 CentOS7 上部署 zookeeper 服务 1 用 SecureCRT 或 XShell 等 Linux 客户端工具连接至 CentOS7 服务器: 2 进入到 /usr/local/too ...
- centos7 docker zookeeper
docker run --name=zookeepertmp -i -t centos7/jdk7 /bin/bash cd /home wget http://apache.fayea.com/zo ...
- centos7 下zookeeper 部署 单机多实例模式
centos7 下zookeeper 部署 本文参考https://www.linuxidc.com/Linux/2016-09/135052.htm 1.创建/usr/local/zookeeper ...
- Linux上安装ZooKeeper并设置开机启动(CentOS7+ZooKeeper3.4.10)
1下载Zookeeper 2安装启动测试 2.1上载压缩文件并解压 2.2新建 zookeeper配置文件 2.3安装JDK 2.4启动zookeeper 2.5查看zookeeper的状态 3将Zo ...
- 原创:centos7.1下 ZooKeeper 集群安装配置+Python实战范例
centos7.1下 ZooKeeper 集群安装配置+Python实战范例 下载:http://apache.fayea.com/zookeeper/zookeeper-3.4.9/zookeepe ...
随机推荐
- POJ 1042 Gone Fishing#贪心
(- ̄▽ ̄)-* #include<iostream> #include<cstdio> #include<cstring> using namespace std ...
- 1、Web应用程序中的安全向量 -- XSS跨站脚本攻击
XSS攻击(跨站脚本攻击)的概念: 用户通过网站页面的输入框植入自己的脚本代码,来获取额外的信息. XSS的实现方式: (1)通过用户将恶意的脚本命令输入到网站中,而这些网站又能够接收"不干 ...
- shell脚本学习(三)
1.在grep中, ^标记着单词的开始, $ 标记着单词的结束. 查看一个单词是否在linux自带的词典中,脚本如下: #bin/sh #文件名:checkword.sh word=$1 grep & ...
- .net大型分布式电子商务架构说明(转载来自<头条>)
背景 构建具备高可用,高扩展性,高性能,能承载高并发,大流量的分布式电子商务平台,支持用户,订单,采购,物流,配送,财务等多个项目的协作,便于后续运营报表,分析,便于运维及监控. 架构演变 基础框架剥 ...
- vmware虚拟机如何安装ubuntu14.10系统
vmware虚拟机安装ubuntu14.10系统安装步骤如下:
- POJ 2676 Sudoku(深搜)
Sudoku Time Limit : 4000/2000ms (Java/Other) Memory Limit : 131072/65536K (Java/Other) Total Submi ...
- 微信账号 echo_server 的实现
<?php/** 微信账号 echo_server 的实现*//** 定义 echo_server 的 TOKEN 为 echo_server*/define("TOKEN" ...
- poll机制分析[转]
所有的系统调用,基于都可以在它的名字前加上"sys_"前缀,这就是它在内核中对应的函数.比如系统调用open.read.write.poll,与之对应的内核函数为:sys_open ...
- wordpress 修改过程
chown -R www /home/www/wordpress,把所有者修改成www. 如果不行 则 解决"要执行请求的操作,WordPress需要访问您网页服务器的权限"方法: ...
- Chapter 2 Open Book——21
I kept my head down and glanced up under my lashes. 我一直保持低着头并且在睫毛之下瞟了一眼. None of them were looking t ...