在CentOS7中安装zookeeper
参考:https://www.linuxidc.com/Linux/2016-09/135052.htm
1.zookeeper运行需要jdk环境,先确保有配置jdk,可以参考此处
2.下载解压zookeeper
先创建下载目录
mkdir -p /usr/local/services/zookeeper
进入zookeeper目录
cd /usr/local/services/zookeeper
下载稳定的zookeeper版本,可参考zookeeper官方下载地址,选择稳定版本,此处下载的是3.4.10版本
wget https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/zookeeper-3.4.10/zookeeper-3.4.10.tar.gz
解压文件
tar -zxvf zookeeper-3.4.10.tar.gz
3.修改zookeeper配置文件
进入到 /usr/local/services/zookeeper/zookeeper-3.4.10/conf 目录中,复制 zoo_sample.cfg 文件的并命名为为 zoo.cfg:
cp zoo_sample.cfg zoo.cfg
用 vim 打开 zoo.cfg 文件并修改其内容为如下:
# The number of milliseconds of each tick # zookeeper 定义的基准时间间隔,单位:毫秒
tickTime=2000 # The number of ticks that the initial
# 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=/tmp/zookeeper # 数据文件夹
dataDir=/usr/local/services/zookeeper/zookeeper-3.4.10/data # 日志文件夹
dataLogDir=/usr/local/services/zookeeper/zookeeper-3.4.10/logs # the port at which the clients will connect
# 客户端访问 zookeeper 的端口号
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
4.配置zookeeper环境变量
用 vim 打开 /etc/ 目录下的配置文件 profile:
vim /etc/profile
在其底部空白处追加如下内容
#--- update for zookeeper---start
export ZOOKEEPER_HOME=/usr/local/services/zookeeper/zookeeper-3.4.10/
export PATH=$ZOOKEEPER_HOME/bin:$PATH
export PATH
#---update for zookeeper---end
使修改文件生效
source /etc/profile
5.操作zookeeper
启动
zkServer.sh start
查看运行状态
zkServer.sh status
停止
zkServer.sh stop
重启
zkServer.sh restart
在CentOS7中安装zookeeper的更多相关文章
- centos7上安装zookeeper
centos7上安装zookeeper 1 准备工作 1.准备服务器,本次安装采用 centos7系统.内存2G.存储60G的虚拟机服务器一台: 2.服务器安装java环境: 参考文章<cent ...
- centos7下安装zookeeper&zookeeper集群的搭建
一.centos7下安装zookeeper 1.zookeeper 下载地址 https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/ 2.安装步骤 ...
- 在centos7中安装Robot Framework
安装前景介绍: 最初,我们是在Windows环境下搭建Robot Framework来对我们的服务进行接口测试的(想知道如何在Windows下安装Robot Framework,可以参考我同事的博客h ...
- centos7中安装、配置、验证、卸载redis
本文介绍在centos7中安装.配置.验证.卸载redis等操作,以及在使用redis中的一些注意事项. 一 安装redis 1 创建redis的安装目录 利用以下命令,切换到/usr/local路径 ...
- centos7中安装mongodb3.6
centos7中安装mongodb3.6 首先更新系统 yum -y update 1.安装Mongodb 编辑Mongodb安装源 vim /etc/yum.repos.d/mongodb-org- ...
- 如何在Centos7上安装zookeeper 多实例
一.如何在Centos7上安装zookeeper 多实例 cd /usr/local/src/ wget https://mirrors.tuna.tsinghua.edu.cn/apache/zoo ...
- 在Centos7中安装elasticsearch5.5
在Centos7中安装elasticsearch5.5 第一步:必须要有jre支持 elasticsearch是用Java实现的,跑elasticsearch必须要有jre支持,所以必须先安装jre ...
- centos7中安装mysql
centos7中安装mysql网上已经很多资源了,我就不在赘述了.我这里只是记录下我安装的时候出现的一些问题. 原文:https://www.cnblogs.com/bigbrotherer/p/72 ...
- CentOS7中安装MySQL(简便)及 网站的搭建
一.首先,我们需要配置CentOS7中网络环境的搭建,物理机IP为192.168.100.39,虚拟机IP为192.168.100.139,网络模式设置为桥接模式 ,再进入系统挂载光盘.输入命令 ...
随机推荐
- 十年感悟之 python之路
本文由 简悦 SimpRead 转码, 原文地址 https://laisky.com/p/python-road/ Changelog: updated at 2019/9/6 一.概述 本文起源于 ...
- 1.JUC锁的一些概念
原文链接:http://blog.csdn.net/zteny/article/details/54859228 接下来的几篇文章都转自这里,冒犯之处,多多包涵 原子性: 在看原子性之前,我们先看看什 ...
- Windows环境下实现Jenkins自动化部署
详见:https://blog.csdn.net/Try_harder_every_day/article/details/79170065 Jenkins自动化部署: 几条具体的思路:1.开发人员将 ...
- pandas(四)
合并 merge,concat,join pd.merge(df1,df2,on=‘列名’,how='') df1.join(df2,how='outer',on='') pd.concat([df ...
- Linux命令——pgrep
参考:Linux pgrep Command Tutorial for Beginners (10 Examples) Linux命令——ps.pstree bash基础——grep.基本正则表达式. ...
- 管理Linux软件——aptitude
https://help.ubuntu.com/lts/serverguide/aptitude.html.en
- IAR 为 STM32新建工程模板(最详细)
今天给小伙伴分享一篇给stm32新建工程模版 1.首先打开IAR,就是这个样子 2.再建一个目录文件夹 3.建立一个工作空间,以及建好工作空间如右图所示 4.接下来建立工程,Project------ ...
- Kotlin重新学习及入门示例
在2017和2018其实已经对Kotlin的基础语法进行了一些学习,但是!!如今已经是2019年,中间间断时间已经很长了,所以准备接下来从0再次出发深入系统完整的来审视一下该语言,毕境如今它的地位是越 ...
- Python下载图片并保存本地的两种方式
一:使用Python中的urllib类中的urlretrieve()函数,直接从网上下载资源到本地,具体代码: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 ...
- springboot中用来进行查看错误日志的logback文件
<?xml version="1.0" encoding="UTF-8"?> <!-- 从高到地低 OFF . FATAL . ERROR . ...