下载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.gztar -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.cfgdataDir=/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相关推荐

  1. 在CentOS上安装ZooKeeper集群

    一共准备3个CentOS虚拟机 172.16.9.194 172.16.9.195 172.16.9.196 上传zookeeper-3.3.6.tar.gz到服务器并解压,3台服务器的目录结构如下 ...

  2. 如何在Ubuntu/CentOS上安装Linux内核4.0

    如何在Ubuntu/CentOS上安装Linux内核4.0 大家好,今天我们学习一下如何从Elrepo或者源代码来安装最新的Linux内核4.0.代号为'Hurr durr I'm a sheep'的 ...

  3. 在CentOS上安装Java环境—openjdk1.7 解决https配置问题

    在CentOS上安装Java环境:[1]使用yum安装java 现阶段做企业级项目开发一般都采用Java语言.开发的项目需要放在服务器上运行测试,若以CentOS系统为服务器系统,首先要解决就是Cen ...

  4. Centos上安装EPEL

    RHEL以及他的衍生发行版如CentOS.Scientific Linux为了稳定,官方的rpm repository提供的rpm包往往是很滞后的,当然了,这样做这是无可厚非的,毕竟这是服务器版本,安 ...

  5. mysql5.7在centos上安装

    2019独角兽企业重金招聘Python工程师标准>>> 原文地址:http://blog.csdn.net/you23hai45/article/details/50984328 h ...

  6. 安装 oracle-xe,CentOS上安装Oracle XE指南

    引言: 在CentOS上安装Oracle XE主要用来解决学习和测试的用处,虽然简单,但也是涉及到了诸多的步骤和细节问题. 1.  下载Oracle XE 访问http://www.oracle.co ...

  7. centos上安装supervisor来管理dotnetcore等应用程序

    supervisor 介绍: 这是一款用python编写的进程管理工具,可以守护他管理的所有进程,防止异常退出,以及提供一个可视化的web界面来手动管理,打开关闭重启各种应用,界面如下: 关于在cen ...

  8. 在Linux系统centos上安装RAR

    由于最近弄了个计划,不得不使用RAR,所以要在centos上安装RAR,记录如下: wget http://www.rarsoft.com/rar/rarlinux-3.9.3.tar.gz tar ...

  9. 在Ubuntu|CentOS上安装Shutter截图工具及快捷键设置

    简介 Shutter前身叫GScrot,它是一款相当棒的截图软件. 通过Shutter,你可以截取包括选定区域.全屏幕.窗口.窗口内的控件甚至网页的图像.通过内置的强大插件机制,你可以在截图后,对图像 ...

最新文章

  1. Kotlin项目实践指南(上)
  2. 比好莱坞市场大6倍—— 体育因数据分析而不同
  3. matlab中结果为nan,这么简单的程序,为什么结果为NaN呢?
  4. Asp.Net实例:C# 绘制统计图(二) ——折线统计图的绘制
  5. 无痛苦的软件维护——文档和代码
  6. nmon监控Linux服务器系统资源
  7. java mysql insert id_MySQL和Java-获取最后插入值的ID(JDBC)[重复]
  8. 香港科技大学理学院数据建模硕士学位项目MSc DDM 项目介绍×申请指南
  9. GIS软件的发展现状总结
  10. 如何Altium Designer中输出元件清单(BOM表格)
  11. 《SEM长尾搜索营销策略解密》一一2.4 长尾的主动与被动
  12. H5页面唤起指定app或跳转到应用市场
  13. 六级,我一定要考好!
  14. DNS域名服务器的搭建
  15. 千兆光纤 GBIC和SFP接口规格介绍
  16. 绘制系列(五)-DrawText()详解
  17. 和月薪5W的华为程序员聊过后,才知道自己一直在打杂...
  18. 《大规模元搜索引擎技(1)》一第1章 绪言
  19. 软件设计师知识点(七):程序设计语言与语言处理程序、法律法规知识
  20. 恢复计算机什么意思,Win10重置此电脑是什么意思数据会全部丢失吗

热门文章

  1. rust 手动关闭子线程_从零开始写 OS (9) —— 内核线程
  2. 在技术圈混,不知道这些你就 OUT 了
  3. R语言绘制环状条形图
  4. 如何起一个好的学术期刊论文题目?
  5. 中国首次纳米孔测序大会:不可错过的教学专场和技术诊断
  6. 2019微生物组—宏基因组分析专题培训第三期
  7. QIIME1.9.1-2使用Docker运行QIIME
  8. 基础002. Editplus编辑远程文件
  9. R语言使用pwr包的pwr.t2n.test函数对分组样本数不同的t检验进行效用分析(power analysis)的语法
  10. R语言使用apriori算法进行关联规则挖掘实战:关联规则概念、频繁项集、支持度(support)、置信度(confidence)、提升度(lift)、apriori算法