[root@centos-linux src]# pwd
/usr/local/src # 1、创建 /usr/local/src/zookeeper 文件夹
[root@centos-linux src]# mkdir -p /usr/local/src/zookeeper # 2、进入到 /usr/local/src/zookeeper 目录中
[root@centos-linux src]# cd /usr/local/src/zookeeper # 3、下载 zookeeper-3.5.2-alpha.tar.gz
[root@centos-linux zookeeper]# wget http://mirrors.shu.edu.cn/apache/zookeeper/zookeeper-3.5.2-alpha/zookeeper-3.5.2-alpha.tar.gz
---- ::-- http://mirrors.shu.edu.cn/apache/zookeeper/zookeeper-3.5.2-alpha/zookeeper-3.5.2-alpha.tar.gz
正在解析主机 mirrors.shu.edu.cn (mirrors.shu.edu.cn)... 202.121.199.235
正在连接 mirrors.shu.edu.cn (mirrors.shu.edu.cn)|202.121.199.235|:... 已连接。
已发出 HTTP 请求,正在等待回应... OK
长度: (18M) [application/x-gzip]
正在保存至: “zookeeper-3.5.-alpha.tar.gz” %[=========================================================================>] ,, 126KB/s 用时 2m 24s -- :: ( KB/s) - 已保存 “zookeeper-3.5.-alpha.tar.gz” [/]) #4、解压缩 zookeeper-3.5.2-alpha.tar.gz
[root@centos-linux zookeeper]# tar -zxvf zookeeper-3.5.-alpha.tar.gz #5、进入到 /usr/local/src/zookeeper/zookeeper-3.5.2-alpha/conf 目录中

[root@centos-linux zookeeper]# cd zookeeper-3.5.-alpha/conf
[root@centos-linux conf]# ls
configuration.xsl log4j.properties zoo_sample.cfg # 6、复制 zoo_sample.cfg 文件的并命名为为 zoo.cfg
[root@centos-linux conf]# cp zoo_sample.cfg zoo.cfg
[root@centos-linux conf]# ls
configuration.xsl log4j.properties zoo.cfg zoo_sample.cfg # 7、用 vim 打开 zoo.cfg 文件并修改其内容为如下
[root@centos-linux conf]# vim zoo.cfg # dataDir=/tmp/zookeeper
# The number of milliseconds of each tick
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=/urs/local/src/zookeeper/zookeeper-3.5.2-alpha/data
#日志文件夹
dataLogDir=/urs/local/src/zookeeper/zookeeper-3.5.2-alpha/logs
# the port at which the clients will connect
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.
# # 8、保存并关闭 zoo.cfg 文件
[root@centos-linux conf]# cd ..
[root@centos-linux zookeeper-3.5.-alpha]# cd bin
[root@centos-linux bin]# ls
README.txt zkCleanup.sh zkCli.cmd zkCli.sh zkEnv.cmd zkEnv.sh zkServer.cmd zkServer-initialize.sh zkServer.sh #9、用 vim 打开 /etc/ 目录下的配置文件 profile

[root@centos-linux bin]# vim /etc/profile #10、并在其尾部追加如下内容

# idea - zookeeper-3.5.2 config start - 2017-04-20 export ZOOKEEPER_HOME=/usr/local/src/zookeeper/zookeeper-3.5.2-alpha/
export PATH=$ZOOKEEPER_HOME/bin:$PATH
export PATH

# idea - zookeeper-3.5.2 config end - 2017-04-20 # 11、使 /etc/ 目录下的 profile 文件即可生效
[root@centos-linux bin]# source /etc/profile # 12、启动 zookeeper 服务

[root@centos-linux bin]# zkServer.sh start
ZooKeeper JMX enabled by default
Using config: /usr/local/src/zookeeper/zookeeper-3.5.-alpha/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED #13、查询 zookeeper 状态
[root@centos-linux bin]# zkServer.sh status
ZooKeeper JMX enabled by default
Using config: /usr/local/src/zookeeper/zookeeper-3.5.-alpha/bin/../conf/zoo.cfg
Client port found: . Client address: localhost.
Mode: standalone # 14、关闭 zookeeper 服务
[root@centos-linux bin]# zkServer.sh stop
ZooKeeper JMX enabled by default
Using config: /usr/local/src/zookeeper/zookeeper-3.5.-alpha/bin/../conf/zoo.cfg
Stopping zookeeper ... STOPPED
[root@centos-linux bin]# zkServer.sh start
ZooKeeper JMX enabled by default
Using config: /usr/local/src/zookeeper/zookeeper-3.5.-alpha/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED # 15、重启 zookeeper 服务
[root@centos-linux bin]# zkServer.sh restart
ZooKeeper JMX enabled by default
Using config: /usr/local/src/zookeeper/zookeeper-3.5.-alpha/bin/../conf/zoo.cfg
ZooKeeper JMX enabled by default
Using config: /usr/local/src/zookeeper/zookeeper-3.5.-alpha/bin/../conf/zoo.cfg
Stopping zookeeper ... STOPPED
ZooKeeper JMX enabled by default
Using config: /usr/local/src/zookeeper/zookeeper-3.5.-alpha/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED

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

  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 上安装 zookeeper-3.4.9 服务

    在 CentOS7 上安装 zookeeper-3.4.9 服务 1.创建 /usr/local/services/zookeeper 文件夹: mkdir -p /usr/local/service ...

  7. 在CentOS7上安装JDK1.8

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

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

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

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

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

  10. 在centos7上安装Jenkins

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

随机推荐

  1. SharedFile System Master Slave(共享文件系统)做ActiveMQ集群

    WINDOWS环境下:http://www.apache.org/dyn/closer.cgi?path=/activemq/apache-activemq/5.9.0/apache-activemq ...

  2. 二:maven构建module

    通常情况下,我们一个项目是需要分多个模块的,这是我们用maven管理项目就需要构建一个多模块的项目: 通常的结构是一个模块中有一个主项目,下面包含多个子项目,如果是web项目则子项目中有一个是java ...

  3. Linux中MySQLl单实例源码编译安装

    MySQL5.5以后源码安装要用cmake 1.3 安装相关包(cmake) 1.3.1 cmake软件 cd /home/Public/tools/ tar xf cmake-2.8.8.tar.g ...

  4. day 35 dom 编程 补充

    前情提要: dom 编程 我记得写过dom 编程的记录..找了博客发现没有内容了.. 少侠重新来过吧

  5. pythonweb框架Flask学习笔记02-一个简单的小程序

    #-*- coding:utf-8 -*- #导入了Flask类 这个类的实例将会是我们的WSGI应用程序 from flask import Flask #创建一个Flask类的实例 第一个参数是应 ...

  6. php 类继承

    %token T_EXTENDS "extends (T_EXTENDS)" unticked_class_declaration_statement: class_entry_t ...

  7. python3模块: uuid

    一. 简介 UUID是128位的全局唯一标识符,通常由32字节的字母串表示.它可以保证时间和空间的唯一性,也称为GUID. 全称为:UUID--Universally Unique IDentifie ...

  8. heroku 部署ruby项目后 未连接数据库显示(We're sorry, but something went wrong. If you are the application owner )

    如何部署请参照: http://blog.csdn.net/xz360717118/article/details/62422741 部署后如果发现显示:We're sorry, but someth ...

  9. php 实现繁体转简体代码效率对比

    第一份代码: <?php Header("Content-Type:text/html;charset=utf-8"); function microtime_float() ...

  10. 计算机硬件的五大单元 & CPU的种类 & 计算机的运行流程

    不多说,直接上干货! 计算机硬件的五大单元 关于计算机的组成部分,其实你可以观察你的桌面计算机分析一下,依外观来说这家伙主要分为三部分: 输入单元:包括键盘.鼠标.卡片阅读机.扫描仪.手写板.触摸屏幕 ...