[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. django-ORM相关代码及其sql执行次数

    1.普通情况:通过log可以看出,这种情况下,访问了1次数据库 def test(request): """测试连表""" users = ...

  2. 一个钓鱼WiFi的破解

    在开始前我们先安装下工具 git clone [url]https://github.com/P0cL4bs/WiFi-Pumpkin.git[/url] [/size] [size=4][size= ...

  3. webstorm 调出project

    Alt+1就能弹出窗口面板.    视图-工具窗口-Project 删除项目 Click File > Close project From Recent projects, select pr ...

  4. Redis初探,写个HelloWorld

    资源获取 https://redis.io/download 从官网上下载redis的源码,使用gcc的安装方式. 安装 make make install 需要达到的效果是,在/usr/local/ ...

  5. windows系统正常但linux系统下找不到文件的问题

    问题描述:最近一个项目开发环境是windows系统,正式环境是linux系统.验证码图片在开发环境正常,但是在正式环境下一直报404. 问题原因:File dir = new File(realPat ...

  6. day 55 linux 的常用命令

    前言 前面咱们已经成功安装了Linux系统--centos7,那么我们现在提好裤腰带,准备奔向Linux的大门.  Linux命令行的组成结构 [root@oldboy_python ~]# [roo ...

  7. apache2.4脚本一键安装(linux环境)

    1.下载apache安装包和相关组件 下载地址:https://pan.baidu.com/s/1o85i6Jw 其中包括 apache安装包:httpd-2.4.29.tar.gz apache安装 ...

  8. 关于component-scan中base-package包含通配符的问题探究

    http://blog.csdn.net/u012325167/article/details/75388990 今天在配置Spring的component-scan时,发现了一个有趣的问题.就是在指 ...

  9. 使用R进行分组统计

    分组统计数据集是很常见的需求,R中也有相应的包支持数据集的分组统计.自己尝试了写了段R代码来完成分组统计数据集,支持公式,感觉用起来还算方便.代码分享在文章最后. 使用方式: step 1: sour ...

  10. docker registry push错误“server gave HTTP response to HTTPS client”

    系统环境:centos7 docker版本: 1.12.3(注意版本,可能存在不同版本设置不同的情况) docker registry版本:2.4.1 问题: 成功安装docker registry, ...