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 ...
随机推荐
- Django基础009--Paginator分页
1.引入 from django.core.paginator import Paginator 2.Paginator对象提供的方法 articles = models.Article.object ...
- python删除文件中某一行
将文本中的 tasting123删除 with open("fileread.txt","r",encoding="utf-8") as f ...
- c++中的对象模型
1 对象模型的前世 类在c++编译器内部可以理解成结构体,所以在对象模型分析时,我们可以把 class 当作一种特殊的 struct: 1)在内存中 class 可以看作是普通成员变量的集合: 2) ...
- Python+Requests+Re(正则)爬取某糗事百科图片(数据分析一)
1.博客目前在学习爬虫课程,使用正则表达式来爬取网页的图片信息 2.下面我们一起来回归下Python中的正则使用方式/方法 3.糗事百科图片爬取源码如下: import requestsimport ...
- 拿来-util工具函数
记录一些写的好的工具函数.以便学习和项目中直接拿来使用. 判断值是否相等:使用于任何数据类型:基本数据类型和复杂深层次对象 function deepEqual (a, b) { if (a === ...
- 如何修改product.product的display_name的显示,解决_rec_name失效的问题
回顾学习 之前有讲解过display_name是怎么由来的,odoo会去取_rec_name的值,会将_rec_name的值赋值给display_name. class FandxProduct(mo ...
- 在docker for windows建立mssql容器后,ssms连接mssql出现错误号码18456的问题
在docker for windows建立mssql容器后,ssms连接mssql出现错误号码18456的问题 笔者提供一个可能会没考虑到的点. 请检查本机是否安装了mssql!!! 请检查本机的ms ...
- vue3.0使用ant-design-vue进行按需加载原来这么简单
下载 ui库 yarn add ant-design-vue 默认是全局引入,打包后体积很大, 非常影响首屏加载速度, 按需加载 下载按需加载的插件;推荐使用cnpm cnpm install bab ...
- 第十四篇 -- QMainWindow与QAction(清空-全选-撤销-重做-关闭-语言选择)
效果图: 这次添加了关闭-撤销-重做-全选-清空等功能,并添加了字体和字体大小选择.基本方法跟前面几篇类似. ui_mainWindow.py # -*- coding: utf-8 -*- # Fo ...
- java标识符,关键字,注释及生成Doc文档
# java语法基础 ## 标识符,关键字与注释 ### 标识符 1.类名,变量名,方法名都称为标识符. 2.命名规则:(1):所有的标识符都应该以字母(AZ,或者az)美元符($)或者下划线(_)开 ...