Centos7安装zookeeper
1.进入/opt
cd /opt
2.下载 zookeeper-
3.4
.10
.tar.gz:
wget https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/zookeeper-3.4.10/zookeeper-3.4.10.tar.gz
3.解压缩 zookeeper-
3.4
.10
.tar.gz:
tar -zxvf zookeeper-3.4.10.tar.gz
4.进入到 /opt/zookeeper-
3.4
.
10
/conf 目录中:
cd zookeeper-3.4./conf/
5.复制 zoo_sample.cfg 文件的并命名为为 zoo.cfg:
cp zoo_sample.cfg zoo.cfg
6.用 vim 打开 zoo.cfg 文件并修改其内容为如下:
# The number of milliseconds of each tick # zookeeper 定义的基准时间间隔,单位:毫秒
tickTime= # The number of ticks that the initial
# synchronization phase can take
initLimit=
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
syncLimit=
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just
# example sakes.
# dataDir=/tmp/zookeeper # 数据文件夹
dataDir=/opt/zookeeper-3.4./data # 日志文件夹
dataLogDir=/opt/zookeeper-3.4./logs # the port at which the clients will connect
# 客户端访问 zookeeper 的端口号
clientPort= # the maximum number of client connections.
# increase this if you need to handle more clients
#maxClientCnxns=
#
# 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=
# Purge task interval in hours
# Set to "" to disable auto purge feature
#autopurge.purgeInterval=
7.保存并关闭 zoo.cfg 文件:
8.进入到 /opt/zookeeper-
3.4
.
10
/bin 目录中:
cd ../bin/
9.用 vim 打开 /etc/ 目录下的配置文件 profile:
vim /etc/profile
并在其尾部追加如下内容:
export ZOOKEEPER_HOME=/opt/zookeeper-3.4./
export PATH=$ZOOKEEPER_HOME/bin:$PATH
export PATH
10.使 /etc/ 目录下的 profile 文件即可生效:
source /etc/profile
11.启动 zookeeper 服务:
zkServer.sh start
如打印如下信息则表明启动成功:
ZooKeeper JMX enabled by default
Using config: /opt/zookeeper-3.4./bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
12.查询 zookeeper 状态:
zkServer.sh status
13.关闭 zookeeper 服务:
[root@localhost bin]# zkServer.sh stop
ZooKeeper JMX enabled by default
Using config: /opt/zookeeper-3.4./bin/../conf/zoo.cfg
Stopping zookeeper ... STOPPED
14.
重启 zookeeper 服务:
[root@localhost bin]# zkServer.sh restart
ZooKeeper JMX enabled by default
Using config: /opt/zookeeper-3.4./bin/../conf/zoo.cfg
ZooKeeper JMX enabled by default
Using config: /opt/zookeeper-3.4./bin/../conf/zoo.cfg
Stopping zookeeper ... no zookeeper to stop (could not find file /opt/zookeeper-3.4./data/zookeeper_server.pid)
ZooKeeper JMX enabled by default
Using config: /opt/zookeeper-3.4./bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
Centos7安装zookeeper的更多相关文章
- 1.centos7 安装zookeeper
1.安装jdk 1)查找jdk包: yum search java|grep jdk 2)安装: yum install -y java-1.8.0-openjdk.x86_64 2. 安装ZooKe ...
- CentOS7 安装zookeeper
本章介绍CentOS的初始配置与zookeeper的安装. www.apache.org/dist/上可以下载Hadoop整个生态环境的组件,我下的Zookeeper3.4.6版本 我一般都是在一个虚 ...
- linux centos7 安装zookeeper
linux 系统下 zookeeper 安装教程 1.下载安装包 1)进入安装目录 cd /home/install/ 2)下载 wget http://mirror.bit.edu.cn/apach ...
- centos7 安装zookeeper 集群
data 创建myid 设置1 zookeeper默认端口2181 同步端口 20881 和 30881 设置zoo.cfg文件
- 如何在Centos7上安装zookeeper 多实例
一.如何在Centos7上安装zookeeper 多实例 cd /usr/local/src/ wget https://mirrors.tuna.tsinghua.edu.cn/apache/zoo ...
- 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.安装步骤 ...
- linux(CentOS7) 之 zookeeper 下载及安装
下载 搜索apache ,进入apache官网(https://www.apache.org/)下载 选择downloads 下的distribution 点击archive site 找到zooke ...
- centos7 安装配置zookeeper
https://blog.csdn.net/AaronLin6/article/details/78438877 https://www.cnblogs.com/sxdcgaq8080/p/74924 ...
随机推荐
- (转)jquery图片左右滚动
<!DOCTYPE HTML> <html> <head> <title>基于jQuery的控制左右滚动效果_自动滚动版本</title> ...
- linux下使用tc(Traffic Control) 流量控制命令模拟网络延迟和丢包
目录 TC案例 TC常用命令 TC安装 TC原理介绍 TC规则 TC操作原理 TC命名规则 TC单位 TC命令 TC案例 如何使用tc模拟网络延迟和丢包 修改网络延时: sudo tc qdisc ...
- Docker 使用docker-compose部署项目
原文地址:https://github.com/eacdy/spring-cloud-book/blob/master/3%20%E4%BD%BF%E7%94%A8Docker%E6%9E%84%E5 ...
- eclipse spring xml 无提示解决
增加自动提示的步骤: 1.window->preference.->xml-xml catalog 2.选中 user specified entried 3.选则Add..按钮 URI: ...
- 非常酷的 Javascript 简单调试工具Blackbird
Blackbird 是一个开源的 Javascript 调试工具,默认提供一种非常酷的方式展现 Javascript 调试信息,如下图,效果如何呢? 在我们的日常的学习或工作中,经常都会接触到 Jav ...
- pandas 绘图与滑窗
#import nessary library before start import pandas as pd import numpy as np import matplotlib.pyplot ...
- Silverlight:telerik RadControls中RadGridView的一个Bug及解决办法(转载)
当RadGridView中嵌套RadComboBox,且RadGridView的高度不够出现滚动条时,上下拉动滚动条后,RadComboBox中的选中值将丢失! 如下图: 滚动条未拖动前 滚动条上下拖 ...
- 提升效率的JQUERY(转)
摘要 本文部分整理了JQuery性能提升的一些方法,内容综合自artzstudio,viralpatel,htmlgoodies等网站,希望对大家有所帮助.这些规则虽然简单,但如果不遵循就会影响程序执 ...
- 实现html锚点的两种方式
1,a标签+name属性. 2,使用标签的id属性:
- JavaScript之Date对象
Javascript中的Date类型是在Java.util.Date基础上创建的. 以1970年01月01日至今的毫秒数来保存时间. 要创建一个Date var now = new Date(); 也 ...