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.10.tar.gz:
wget https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/zookeeper-3.4.10/zookeeper-3.4.10.tar.gz
4、解压缩 zookeeper-3.4.10.tar.gz:
tar -zxvf zookeeper-3.4.10.tar.gz
5、进入到 /usr/local/services/zookeeper/zookeeper-3.4.10/conf 目录中:
cd zookeeper-3.4.10/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.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
 
8、保存并关闭 zoo.cfg 文件:
9、进入到 /usr/local/services/zookeeper/zookeeper-3.4.10/bin 目录中:
cd ../bin/
10、用 vim 打开 /etc/ 目录下的配置文件 profile:
vim /etc/profile
并在其尾部追加如下内容:
# idea - zookeeper-3.4.10 config start - 2016-09-08
export ZOOKEEPER_HOME=/usr/local/services/zookeeper/zookeeper-3.4.10/
export PATH=$ZOOKEEPER_HOME/bin:$PATH
export PATH # idea - zookeeper-3.4.10 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.10/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.10/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.10/bin/../conf/zoo.cfg
ZooKeeper JMX enabled by default
Using config: /usr/local/services/zookeeper/zookeeper-3.4.10/bin/../conf/zoo.cfg
Stopping zookeeper ... STOPPED
ZooKeeper JMX enabled by default
Using config: /usr/local/services/zookeeper/zookeeper-3.4.10/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED

centos7 单台zookeeper安装的更多相关文章

  1. Redis单台的安装部署及集群部署

    Redis是一种高级key-value数据库.它跟memcached类似,不过数据可以持久化,而且支持的数据类型很丰富.有字符串,链表,集 合和有序集合.支持在服务器端计算集合的并,交和补集(diff ...

  2. 进阶!基于CentOS7系统使用cobbler实现单台服务器批量自动化安装不同版本系统(week3_day5_part2)-技术流ken

    前言 在上一篇博文<cobbler批量安装系统使用详解-技术流ken>中已经详细讲解了cobbler的使用以及安装,本篇博文将会使用单台cobbler实现自动化批量安装不同版本的操作系统. ...

  3. cobbler单台服务器实现批量自动化安装不同版本系统-技术流ken

    前言 在上一篇博文<cobbler批量安装系统使用详解-技术流ken>中已经详细讲解了cobbler的使用以及安装,本篇博文将会使用单台cobbler实现自动化批量安装不同版本的操作系统. ...

  4. 单台机器安装zookeeper

    先给一堆学习文档,方便以后查看 官网文档地址大全: OverView(概述) http://zookeeper.apache.org/doc/r3.4.6/zookeeperOver.html Get ...

  5. 原创:centos7.1下 ZooKeeper 集群安装配置+Python实战范例

    centos7.1下 ZooKeeper 集群安装配置+Python实战范例 下载:http://apache.fayea.com/zookeeper/zookeeper-3.4.9/zookeepe ...

  6. Centos7 单节点安装 FastDFS + FastDHT服务

    Centos7 单节点安装 FastDFS + FastDHT服务 1.安装gcc(编译时需要) FastDFS是C语言开发,安装FastDFS需要先将官网下载的源码进行编译,编译依赖gcc环境,如果 ...

  7. weblogic11g 安装集群 —— win2003 系统、单台主机

    weblogic11g 安装集群 —— win2003 系统.单台主机 注意:此为weblogic11g  在win2003系统下(一台主机)的安装集群,linux.hpux.aix及多个主机下原理一 ...

  8. 在 CentOS7 上部署 zookeeper 服务

    在 CentOS7 上部署 zookeeper 服务 1 用 SecureCRT 或 XShell 等 Linux 客户端工具连接至 CentOS7 服务器: 2 进入到 /usr/local/too ...

  9. zookeeper安装配置

    以3.3.3为例(当然,前提是要安装好jdk,zookeeper的启动时依赖于jdk的) (1) wget http://www.apache.org/dist//zookeeper/zookeepe ...

随机推荐

  1. k8s PersistentVolume hostpath 简单使用

    kubernets host PersistentVolume 测试 因为yaml 格式的问题 ,我修改为了json 创建 pv pv.json { "kind": "P ...

  2. kettle环境变量的设置和获取

    1. 变量的类型Kettle 的早期版本中的变量只有系统环境变量目前版本中(3.1) 变量包括系统环境变量, "Kettle变量" 和内部变量三种 系统环境变量的影响范围很广,凡是 ...

  3. /etc/sysctl.conf参数解释(转)

    来自<深入理解Nginx模块开发与架构解析> P9 #表示进程(例如一个worker进程)可能同时打开的最大句柄数,直接限制最大并发连接数fs.file max = 999999 #1代表 ...

  4. apache make

    https://jingyan.baidu.com/article/7e4409533d7f0f2fc0e2ef91.html 1. apr apr-util http://archive.apach ...

  5. JWPlayer快速入门指南(中文)

    将JW Player嵌入到网页中非常的简单,只需要进行如下3个步骤: 1.解压mediaplayer-viral.zip文件,将jwplayer.js和player.swf文件拷贝到工程中: 2.在页 ...

  6. Train-Alypay-Cloud:mPaaS 移动开发平台培训(第一次)

    ylbtech-Train-Alypay-Cloud:mPaaS 移动开发平台培训(第一次) 1.返回顶部 1. 大家好! 欢迎大家参加蚂蚁金融云 即将在2018年1月17日到1月18日 在北京 环球 ...

  7. [转]使用Android-Studio 开发Android 程序

    界面主题可以从这里下载:http://color-themes.com/ 杂七杂八(包含Android-Studio 自身):http://www.androiddevtools.cn/ genymo ...

  8. TCL数组

    数组是一组使用索引对应元素的排列方式.常规数组的语法如下所示. set ArrayName(Index) value 用于创建简单数组的例子,如下所示. #!/usr/bin/tclsh set la ...

  9. python编程遇见的异常

    import sys print('目前系统的编码为:',sys.getdefaultencoding()) # 目前系统的编码为: utf-8 name = 'this is a test!' pr ...

  10. 熟练的使用CIFAR-10数据集

    CIFIR-10是一套包含60000张,大小为32x32的十分类图片数据集,其中50000张被分为训练数据,10000张被分为测试数据,http://www.cs.toronto.edu/~kriz/ ...