centos上安装zookeeper
下载zookeeper
# 创建zookeeper文件夹
cd /usr/local/
mkdir zookeeper
cd zookeeper
# 下载 解压
wget https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/current/apache-zookeeper-3.6.2-bin.tar.gz
tar -zxvf apache-zookeeper-3.6.2-bin.tar.gz
配置zookeeper
cd /usr/local/zookeeper/apache-zookeeper-3.6.2-bin/conf
# cp 一份zoo_sample.cfg
cp zoo_sample.cfg zoo.cfg
# 修改以下配置
vim zoo.cfg
dataDir=/usr/local/zookeeper/apache-zookeeper-3.6.2-bin/dataDir
dataLogDir=/usr/local/zookeeper/apache-zookeeper-3.6.2-bin/dataLogDir
quorumListenOnAllIPs=true
zoo.cfg
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just
# example sakes.
dataDir=/usr/local/zookeeper/apache-zookeeper-3.6.2-bin/dataDir
dataLogDir=/usr/local/zookeeper/apache-zookeeper-3.6.2-bin/dataLogDir
# the port at which the clients will connect
clientPort=2181
# the maximum number of client connections.
# increase this if you need to handle more clients
#maxClientCnxns=60
#
# Be sure to read the maintenance section of the
# administrator guide before turning on autopurge.
#
# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
#
# The number of snapshots to retain in dataDir
#autopurge.snapRetainCount=3
# Purge task interval in hours
# Set to "0" to disable auto purge feature
#autopurge.purgeInterval=1
## Metrics Providers
#
# https://prometheus.io Metrics Exporter
#metricsProvider.className=org.apache.zookeeper.metrics.prometheus.PrometheusMetricsProvider
#metricsProvider.httpPort=7000
#metricsProvider.exportJvmInfo=true
quorumListenOnAllIPs=true
添加到全局环境变量
vim /etc/profile
# 添加到最后zookeeper
export ZOOKEEPER_HOME=/usr/local/zookeeper/apache-zookeeper-3.6.2-bin
export PATH=$PATH:$ZOOKEEPER_HOME/bin
# 刷新配置
source /etc/profile
启动命令
服务管理命令:zkServer.sh start|stop|restart|status
客户端连接:zkCli.sh -server ${ip}:${port}
centos上安装zookeeper的更多相关文章
- 在CentOS上安装ZooKeeper集群
一共准备3个CentOS虚拟机 172.16.9.194 172.16.9.195 172.16.9.196 上传zookeeper-3.3.6.tar.gz到服务器并解压,3台服务器的目录结构如下 ...
- NoSql1 在Linux(CentOS)上安装memcached及使用
前言: 今天是初五,生活基本要从过年的节奏中回归到正常的生活了,所以想想也该想想与工作有关的事情了.我之前在工作中会经常使用memcached和redis,但是自己一直没有时间系统的好好看 ...
- 在Ubuntu|CentOS上安装Shutter截图工具及快捷键设置
简介 Shutter前身叫GScrot,它是一款相当棒的截图软件. 通过Shutter,你可以截取包括选定区域.全屏幕.窗口.窗口内的控件甚至网页的图像.通过内置的强大插件机制,你可以在截图后,对图像 ...
- 在CentOS上安装rabbitmq-server
***在 CentOS 6.4上安装python*** 注意啊,自己手动安装python2.7.5,不要动系统上面其他的版本 1,先安装GCC,用如下命令yum install gcc gcc-c++ ...
- CentOS上安装软件错误提示:configure: error: no acceptable C compiler found in $PATH
CentOS上安装软件错误提示:configure: error: no acceptable C compiler found in $PATH 因为是centos linux,默认可以采用yum方 ...
- 如何在centos上安装epel源
一.EPEL是什么? EPEL (Extra Packages for Enterprise Linux,企业版Linux的额外软件包) 是Fedora小组维护的一个软件仓库项目,为RHEL/Cent ...
- 在Centos上安装RabbitMQ流程(转)
在Centos上安装RabbitMQ流程------------------------ 1. 需求 由于项目中要用到消息队列,经过ActiveMQ与RabbitMQ的比较,最终选择了RabbbitM ...
- CentOS上安装Node.js
CentOS上安装Node.js [日期:2014-07-21] 来源:Linux社区 作者:maskdfe [字体:大 中 小] CentOS上安装Node.js(想在Linux上学习No ...
- Linux系统入门学习:在CentOS上安装phpMyAdmin
问题:我正在CentOS上运行一个MySQL/MariaDB服务,并且我想要通过网络接口来用phpMyAdmin来管理数据库.在CentOS上安装phpMyAdmin的最佳方法是什么? phpMyAd ...
随机推荐
- NFS共享存储服务
NFS共享存储服务 一.NFS共享 1)NFS(Network File System)网络文件系统 ...
- JMeter之Throughput Controller吞吐量控制器
吞吐量控制器,它是用来控制该控制器下面元件的执行次数,与控制吞吐量的功能无关.(注:用Constant Throughput Timer可以控制吞吐量tps) 作用:控制其子节点的执行次数与负载比例分 ...
- 前端性能优化实践-gzip
一名优秀的前端工程师必备技能之一就是要会性能监控,并且能相应的进行性能优化.最近,有需求将项目做一些优化,提升用户的体验.看了一下项目并没有开启gzip,于是着手实现gzip压缩,下面就是具体的实践过 ...
- Windows内核驱动--实现修改线程优先级demo
在User下修改优先级比较麻烦,该驱动可以直接用线程ID,和优先级级数两个参数直接修改线程的优先级: Client代码: #include <Windows.h> #include < ...
- RHEL7通过Rsyslog搭建集中日志服务器
说明:这里是Linux服务综合搭建文章的一部分,本文可以作为单独搭建rsyslog日志服务器的参考. 注意:这里所有的标题都是根据主要的文章(Linux基础服务搭建综合)的顺序来做的. 如果需要查看相 ...
- Webmin 远程命令执行漏洞(CVE-2019-15107)
影响版本 Webmin 1.920及以下版本 poc地址 https://github.com/Mr-xn/Penetration_Testing_POC/tree/master/CVE-2019-1 ...
- 计算距离2020年圣诞节还有x天x时x分x秒
//计算两者相差毫秒数 //创建当前时间和圣诞节时间的Date对象 var d1=new Date(); var d2=new Date('2020/12/25'); //计算相差的毫秒 var d= ...
- Hadoop 3.1.1 - Yarn 服务 - 总览
YARN 服务 总览 Yarn 服务框架为在 Yarn 原生环境里长时间运行的服务,提供了一流的支持和接口.简言之,它扮演了容器编排系统的角色,统一管理 Yarn 上运行的容器化服务.它同时支持 Do ...
- Salesforce Integration 概览(三) Remote Process Invocation—Fire and Forget(远程进程调用-发后即弃)
本篇参考:https://resources.docs.salesforce.com/sfdc/pdf/integration_patterns_and_practices.pdf 我们在上一篇讲了远 ...
- Mybatis学习笔记-分页
为何要分页 减少数据处理量 便于前端展示数据 使用Limit分页 语法结构 SELECT * FROM user LIMIT startIndex,pageSize; SELECT * FROM us ...