在 CentOS7 上安装 zookeeper-3.4.9 服务
在 CentOS7 上安装 zookeeper-3.4.9 服务 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.9.tar.gz:
wget https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/zookeeper-3.4.9/zookeeper-3.4.9.tar.gz 4、解压缩 zookeeper-3.4.9.tar.gz:
tar -zxvf zookeeper-3.4.9.tar.gz 5、进入到 /usr/local/services/zookeeper/zookeeper-3.4.9/conf 目录中:
cd zookeeper-3.4.9/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.9/data # 日志文件夹
dataLogDir=/usr/local/services/zookeeper/zookeeper-3.4.9/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.9/bin 目录中:
cd ../bin/ 10、用 vim 打开 /etc/ 目录下的配置文件 profile:
vim /etc/profile
并在其尾部追加如下内容: # idea - zookeeper-3.4.9 config start - 2016-09-08 export ZOOKEEPER_HOME=/usr/local/services/zookeeper/zookeeper-3.4.9/
export PATH=$ZOOKEEPER_HOME/bin:$PATH
export PATH # idea - zookeeper-3.4.9 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.9/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.9/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.9/bin/../conf/zoo.cfg
ZooKeeper JMX enabled by default
Using config: /usr/local/services/zookeeper/zookeeper-3.4.9/bin/../conf/zoo.cfg
Stopping zookeeper ... STOPPED
ZooKeeper JMX enabled by default
Using config: /usr/local/services/zookeeper/zookeeper-3.4.9/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
在 CentOS7 上安装 zookeeper-3.4.9 服务的更多相关文章
- 如何在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上安装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 ...
随机推荐
- ABP源码分析二十九:ABP.MongoDb
这个Module通过建立一个MongoDbRepositoryBase<TEntity> 基类,封装了对MongoDb数据库的操作. 这个module通过引用MongoDB.Driver, ...
- 如何选择靠谱的app外包公司,2017最新资讯
企业在外包开发app之前最纠结的问题就是如何选择一个靠谱的app外包公司.因为一个靠谱的app外包公司非常重要,完全决定了app外包开发的周期.bug.售后服务等各方面问题,可以说app开发外包团队一 ...
- Python 学习之路 (一):基础
数据类型和变量 整数 在Python3中,整数可以处理任意大小的整数,不分长整型和整型, 十六进制用0x开头或者H结尾表示:0x2af ,2afH 用函数 int() 来转换字符串中的数字,里面不能包 ...
- GitHub实战系列~2.把本地项目提交到github中 2015-12-10
GitHub实战系列汇总:http://www.cnblogs.com/dunitian/p/5038719.html ———————————————————————————————————————— ...
- 为 Sublime Text 3059 配置 PHP 编译环境
关于 Sublime Text 3059 的安装及汉化 请参看 http://www.xiumu.org/note/sublime-text-3.shtml 为 sublime Text 配置 PH ...
- mysql数据库开发常见问题及优化
mysql 数据库是被广泛应用的关系型数据库,其体积小.支持多处理器.开源并免费的特性使其在 Internet 中小型网站中的使用率尤其高.在使用 mysql 的过程中不规范的 SQL 编写.非最优的 ...
- Webstorm编译TypeScript
下载webstorm 下载node.js编译器npm Webstorm的安装很简单.但如果没有Java For Mac 环境打开Webstorm时会有提示,点击提示会跳转下载链接,下载安装就好. ...
- 压力测试之badboy和Jmeter的简单使用方法
文章版权由作者李晓晖和博客园共有,若转载请于明显处标明出处:http://www.cnblogs.com/naaoveGIS/ 1.背景 所谓压力测试是指,通过确定一个系统的瓶颈或者不能接收的性能点, ...
- [JSP]JSP 简介
1.1 概述 1.1.1 什么是 JSP? JSP 全称是 Java Server Pages,是一种动态网页开发技术. 它与 PHP.ASP.ASP.NET 等语言类似,运行在服务端的语言. JSP ...
- java中异常抛出后代码还会继续执行吗
今天遇到一个问题,在下面的代码中,当抛出运行时异常后,后面的代码还会执行吗,是否需要在异常后面加上return语句呢? public void add(int index, E element){ i ...