在 CentOS7 上安装 zookeeper-3.4.9 服务

1、创建 /usr/local/services/zookeeper 文件夹:
mkdir -p /usr/local/services/zookeeper 2、进入到 /usr/local/services/zookeeper 目录中:
cd /usr/local/services/zookeeper 3、下载 zookeeper-3.4.9.tar.gz:
wget https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/zookeeper-3.4.9/zookeeper-3.4.9.tar.gz 4、解压缩 zookeeper-3.4.9.tar.gz:
tar -zxvf zookeeper-3.4.9.tar.gz 5、进入到 /usr/local/services/zookeeper/zookeeper-3.4.9/conf 目录中:
cd zookeeper-3.4.9/conf/ 6、复制 zoo_sample.cfg 文件的并命名为为 zoo.cfg:
cp zoo_sample.cfg zoo.cfg 7、用 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.9/data # 日志文件夹
dataLogDir=/usr/local/services/zookeeper/zookeeper-3.4.9/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 8、保存并关闭 zoo.cfg 文件: 9、进入到 /usr/local/services/zookeeper/zookeeper-3.4.9/bin 目录中:
cd ../bin/ 10、用 vim 打开 /etc/ 目录下的配置文件 profile:
vim /etc/profile
并在其尾部追加如下内容: # idea - zookeeper-3.4.9 config start - 2016-09-08 export ZOOKEEPER_HOME=/usr/local/services/zookeeper/zookeeper-3.4.9/
export PATH=$ZOOKEEPER_HOME/bin:$PATH
export PATH # idea - zookeeper-3.4.9 config start - 2016-09-08 11、使 /etc/ 目录下的 profile 文件即可生效:
source /etc/profile 12、启动 zookeeper 服务:
zkServer.sh start
如打印如下信息则表明启动成功:
ZooKeeper JMX enabled by default
Using config: /usr/local/services/zookeeper/zookeeper-3.4.9/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED 13、查询 zookeeper 状态:
zkServer.sh status 14、关闭 zookeeper 服务:
zkServer.sh stop
如打印如下信息则表明成功关闭:
ZooKeeper JMX enabled by default
Using config: /usr/local/services/zookeeper/zookeeper-3.4.9/bin/../conf/zoo.cfg
Stopping zookeeper ... STOPPED 15、重启 zookeeper 服务:
zkServer.sh restart
如打印如下信息则表明重启成功:
ZooKeeper JMX enabled by default
Using config: /usr/local/services/zookeeper/zookeeper-3.4.9/bin/../conf/zoo.cfg
ZooKeeper JMX enabled by default
Using config: /usr/local/services/zookeeper/zookeeper-3.4.9/bin/../conf/zoo.cfg
Stopping zookeeper ... STOPPED
ZooKeeper JMX enabled by default
Using config: /usr/local/services/zookeeper/zookeeper-3.4.9/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED

  

在 CentOS7 上安装 zookeeper-3.4.9 服务的更多相关文章

  1. 如何在Centos7上安装zookeeper 多实例

    一.如何在Centos7上安装zookeeper 多实例 cd /usr/local/src/ wget https://mirrors.tuna.tsinghua.edu.cn/apache/zoo ...

  2. centos7上安装zookeeper

    centos7上安装zookeeper 1 准备工作 1.准备服务器,本次安装采用 centos7系统.内存2G.存储60G的虚拟机服务器一台: 2.服务器安装java环境: 参考文章<cent ...

  3. 在 CentOS7 上安装 Zookeeper服务

    1.创建 /usr/local/services/zookeeper 文件夹: mkdir -p /usr/local/services/zookeeper 2.进入到 /usr/local/serv ...

  4. 在CentOS7上安装ftp服务器用于保存服务端上传的图片。

    1.CentOS卸载vsftpd的方法 如果服务器上已经安装了vsftpd服务,配置出错需要卸载vsftpd服务. 1.1 查找vsftpd服务 [root@localhost /]# rpm -aq ...

  5. 在CentOS7上安装和使用ZooKeeper最新版本(V3.4.12)

    0.ZooKeeper文档 http://zookeeper.apache.org/doc/r3.4.11/zookeeperOver.html 1.准备 在CentOS7上安装zookeeper时, ...

  6. 在CentOS7上安装JDK1.8

    在CentOS7上安装JDK1.8 1 通过 SecureCRT 连接到阿里云 CentOS7 服务器: 2 进入到目录 /usr/local/ 中: cd /usr/local/ 3 创建目录 to ...

  7. Linux上安装Zookeeper以及一些注意事项

    最近打算出一个系列,介绍Dubbo的使用. 分布式应用现在已经越来越广泛,Spring Could也是一个不错的一站式解决方案,不过据我了解国内目前貌似使用阿里Dubbo的公司比较多,一方面这个框架也 ...

  8. centos7下安装zookeeper&zookeeper集群的搭建

    一.centos7下安装zookeeper 1.zookeeper 下载地址 https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/ 2.安装步骤 ...

  9. 在centos7上安装Jenkins

    在centos7上安装Jenkins 安装 添加yum repos,然后安装 sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins ...

随机推荐

  1. Linux Socket 原始套接字编程

    对于linux网络编程来说,可以简单的分为标准套接字编程和原始套接字编程,标准套接字主要就是应用层数据的传输,原始套接字则是可以获得不止是应用层的其他层不同协议的数据.与标准套接字相区别的主要是要开发 ...

  2. C#开源实现MJPEG流传输

    本文为 Dennis Gao 原创技术文章,发表于博客园博客,未经作者本人允许禁止任何形式的转载. 许久以前写了篇文章<基于.NET打造IP智能网络视频监控系统>,记录和介绍了自己几年来积 ...

  3. ASP.NET MVC Model绑定(二)

    ASP.NET MVC Model绑定(二) 前言 上篇对于Model绑定的简单演示想必大家对Model绑定的使用方式有一点的了解,那大家有没有想过Model绑定器是在什么时候执行的?又或是执行的过程 ...

  4. Top Coder算法题目浏览器

    作者:Lucida 微博:@peng_gong 豆瓣:@figure9 原文链接:http://zh.lucida.me/blog/top-code-offline-browser/ 关于 左耳朵耗子 ...

  5. PHP中多线程处理

    php多进程处理 往往我们会碰到一个情况,需要写一个脚本,这个脚本要处理的数据量极大,单进程处理脚本非常慢,那么这个时候就会想到使用多进程或者多线程的方式了. 我习惯使用多进程的方式,php中使用多进 ...

  6. Android-Eclipse-INSTALL_FAILED_UPDATE_INCOMPATIBLE错误

    电脑重装了系统,环境问题一大堆,唉,搞死人,这不,今天就出现了这样的一个奇怪的问题. INSTALL_FAILED_UPDATE_INCOMPATIBLE 最后搜了一遍,发现是因为已经安装了这个包,包 ...

  7. C#定时任务组件之FluentScheduler

    FluentScheduler是.NET开源处理定时任务组件 1.任务的创建注册 public static void TaskActionByMinutes(Action action, int c ...

  8. Hawk 3. 网页采集器

    1.基本入门 1. 原理(建议阅读) 网页采集器的功能是获取网页中的数据(废话).通常来说,目标可能是列表(如购物车列表),或是一个页面中的固定字段(如JD某商品的价格和介绍,在页面中只有一个).因此 ...

  9. 如何重置硬盘遭到“损坏”的Linux系统root用户密码

    传统印象下Linux是非常坚不可摧的,具有千年不更新,万年不重启的美名.而随着虚拟化的推进,很多跑在虚拟化上的Linux由于先前基础架构的脆弱,变得适应性“越来越不好”,体现在IP存储如果出现节点故障 ...

  10. 【原创】Kafka Consumer多线程实例

    Kafka 0.9版本开始推出了Java版本的consumer,优化了coordinator的设计以及摆脱了对zookeeper的依赖.社区最近也在探讨正式用这套consumer API替换Scala ...