[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. click 版本升级7.0踩过的坑

    click 版本升级7.0踩过哪些坑? click 版本6.7升级至7.0以上,包名由 click 变更为 Click click 的 Options 和 Parameters 规则变更为如下: Fo ...

  2. jzoj5996

    我們可以枚舉每一個串的最短回文後綴,這樣一定不會算重. 雖然一個字符串可能會有多個回文後綴,但是答案只會在最短的後綴被計算 記f[i]表示長度為i回文串中,沒有長度>1的回文後綴的個數,將總個數 ...

  3. Linux 操作日志

    这里: /var/log/messages

  4. git连接通过ssh连接github

    解决 git连接通过ssh连接github 1. 首先产生一个rsa的私钥和公钥 ssh-keygen -t rsa -C "15950093214@163.com"  //你的g ...

  5. 【bzoj3684】 大朋友和多叉树 生成函数+多项式快速幂+拉格朗日反演

    这题一看就觉得是生成函数的题... 我们不妨去推下此题的生成函数,设生成函数为$F(x)$,则$[x^s]F(x)$即为答案. 根据题意,我们得到 $F(x)=x+\sum_{i∈D} F^i(x)$ ...

  6. (转)CentOS7使用ACL精确控制文件和目录的访问权限

    原文:https://www.linuxidc.com/Linux/2018-01/150111.htm https://blog.csdn.net/maxiaoqiang1/article/deta ...

  7. 【数组】Maximum Product Subarray

    题目: Find the contiguous subarray within an array (containing at least one number) which has the larg ...

  8. Android 开发工具类 11_ToolFor9Ge

    1.缩放/ 裁剪图片: 2.判断有无网络链接: 3.从路径获取文件名: 4.通过路径生成 Base64 文件: 5.通过文件路径获取到 bitmap: 6.把 bitmap 转换成 base64: 7 ...

  9. java学习-AES加解密之AES-128-CBC算法

    AES算法简介 AES是一种对称加密算法,或称分组对称加密算法.  是Advanced Encryption Standard高级加密标准,简称AES AES的基本要求是,采用对称分组密码体制.分组密 ...

  10. tensorflow语法笔记

    1.如何理解 tf.reduce_max或者 tf.reduce_mean中对Tensor和高维矩阵的坐标轴axis的选择的操作 tf.reduce_mean( input_tensor, axis= ...