在 CentOS7 上安装 zookeeper-3.5.2 服务
[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 服务的更多相关文章
- 如何在Centos7上安装zookeeper 多实例
一.如何在Centos7上安装zookeeper 多实例 cd /usr/local/src/ wget https://mirrors.tuna.tsinghua.edu.cn/apache/zoo ...
- centos7上安装zookeeper
centos7上安装zookeeper 1 准备工作 1.准备服务器,本次安装采用 centos7系统.内存2G.存储60G的虚拟机服务器一台: 2.服务器安装java环境: 参考文章<cent ...
- 在 CentOS7 上安装 Zookeeper服务
1.创建 /usr/local/services/zookeeper 文件夹: mkdir -p /usr/local/services/zookeeper 2.进入到 /usr/local/serv ...
- 在CentOS7上安装ftp服务器用于保存服务端上传的图片。
1.CentOS卸载vsftpd的方法 如果服务器上已经安装了vsftpd服务,配置出错需要卸载vsftpd服务. 1.1 查找vsftpd服务 [root@localhost /]# rpm -aq ...
- 在CentOS7上安装和使用ZooKeeper最新版本(V3.4.12)
0.ZooKeeper文档 http://zookeeper.apache.org/doc/r3.4.11/zookeeperOver.html 1.准备 在CentOS7上安装zookeeper时, ...
- 在 CentOS7 上安装 zookeeper-3.4.9 服务
在 CentOS7 上安装 zookeeper-3.4.9 服务 1.创建 /usr/local/services/zookeeper 文件夹: mkdir -p /usr/local/service ...
- 在CentOS7上安装JDK1.8
在CentOS7上安装JDK1.8 1 通过 SecureCRT 连接到阿里云 CentOS7 服务器: 2 进入到目录 /usr/local/ 中: cd /usr/local/ 3 创建目录 to ...
- Linux上安装Zookeeper以及一些注意事项
最近打算出一个系列,介绍Dubbo的使用. 分布式应用现在已经越来越广泛,Spring Could也是一个不错的一站式解决方案,不过据我了解国内目前貌似使用阿里Dubbo的公司比较多,一方面这个框架也 ...
- centos7下安装zookeeper&zookeeper集群的搭建
一.centos7下安装zookeeper 1.zookeeper 下载地址 https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/ 2.安装步骤 ...
- 在centos7上安装Jenkins
在centos7上安装Jenkins 安装 添加yum repos,然后安装 sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins ...
随机推荐
- docker-compose批量管理docker容器
# docker-compose编排工具 #批量管理(构建.启动容器) #centos7环境准备#安装docker-ce #安装docker-compose v1. sudo curl -o /usr ...
- MySQL(动态执行SQL)
day61 防sql注入 delimiter \\ CREATE PROCEDURE p4 ( ), in arg int ) BEGIN set @xo = arg; PREPARE xxx FRO ...
- mysql中date,datetime,timestamp数据类型区别
(1)date表示日期,其范围为1000-01-01到9999-12-31 (2)datetime表示日期时间,其范围是1000-01-01 00:00:00到9999-12-31 23:59:59 ...
- module.export与export的区别?
对于大多数node初学者而言, module.exports应该都是理解的, 但多出来一个exports获取就有些疑问了 疑问一: 既然有module.exports了为什么还要有exports? 疑 ...
- Jmeter之Bean shell使用
转载地址:http://www.cnblogs.com/puresoul/p/4915350.html 一.什么是Bean Shell BeanShell是一种完全符合Java语法规范的脚本语言,并且 ...
- 模仿 AppStore 顶部动画
App Store 顶部动画 App Store 中 Games.Apps.Updates 的顶部动画的特点: 自然状态下是大标题,右边有一个 button 顶上去时,变成小标题,右边按钮消失 导航栏 ...
- angular.js的依赖注入解析
本教程使用AngularJS版本:1.5.3 angularjs GitHub: https://github.com/angular/angular.js/ Angula ...
- Java爬虫项目实战(一)
目的: 通过网络爬虫爬取中国最小粒度的区域维度信息,包括省(Province) .市(City).县(County).镇(town).村委会(village) 主网站链接: http://www.st ...
- 2018春招-今日头条笔试题5题(后附大佬答案-c++版)
1题目描述 在n个元素的数组中,找到差值为k的除重后的数字对 输入描述 第一行:n和k,n表示数字的个数,k表示差值 第二行:n个整数 输入样例 输入: 5 2 1 5 3 4 2 输出: 3 说明: ...
- php 数字 的简单加解密
转载 <?php /** * 加密解密类 * 该算法仅支持加密数字.比较适用于数据库中id字段的加密解密,以及根据数字显示url的加密. * @author 深秋的竹子 * @email 812 ...