Centos7安装zookeeper
1.进入/opt
cd /opt
2.下载 zookeeper-3.4.10.tar.gz:
wget https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/zookeeper-3.4.10/zookeeper-3.4.10.tar.gz
3.解压缩 zookeeper-3.4.10.tar.gz: tar -zxvf zookeeper-3.4.10.tar.gz
4.进入到 /opt/zookeeper-3.4.10/conf 目录中:cd zookeeper-3.4./conf/
5.复制 zoo_sample.cfg 文件的并命名为为 zoo.cfg:
cp zoo_sample.cfg zoo.cfg
6.用 vim 打开 zoo.cfg 文件并修改其内容为如下:
# The number of milliseconds of each tick
# zookeeper 定义的基准时间间隔,单位:毫秒
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=/opt/zookeeper-3.4./data
# 日志文件夹
dataLogDir=/opt/zookeeper-3.4./logs
# the port at which the clients will connect
# 客户端访问 zookeeper 的端口号
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.
#
# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
#
# The number of snapshots to retain in dataDir
#autopurge.snapRetainCount=
# Purge task interval in hours
# Set to "" to disable auto purge feature
#autopurge.purgeInterval=
7.保存并关闭 zoo.cfg 文件:
8.进入到 /opt/zookeeper-3.4.10/bin 目录中:cd ../bin/
9.用 vim 打开 /etc/ 目录下的配置文件 profile:
vim /etc/profile
并在其尾部追加如下内容:
export ZOOKEEPER_HOME=/opt/zookeeper-3.4./
export PATH=$ZOOKEEPER_HOME/bin:$PATH
export PATH
10.使 /etc/ 目录下的 profile 文件即可生效:source /etc/profile
11.启动 zookeeper 服务: zkServer.sh start
如打印如下信息则表明启动成功:ZooKeeper JMX enabled by default
Using config: /opt/zookeeper-3.4./bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
12.查询 zookeeper 状态:zkServer.sh status
13.关闭 zookeeper 服务: [root@localhost bin]# zkServer.sh stop
ZooKeeper JMX enabled by default
Using config: /opt/zookeeper-3.4./bin/../conf/zoo.cfg
Stopping zookeeper ... STOPPED
14.重启 zookeeper 服务:[root@localhost bin]# zkServer.sh restart
ZooKeeper JMX enabled by default
Using config: /opt/zookeeper-3.4./bin/../conf/zoo.cfg
ZooKeeper JMX enabled by default
Using config: /opt/zookeeper-3.4./bin/../conf/zoo.cfg
Stopping zookeeper ... no zookeeper to stop (could not find file /opt/zookeeper-3.4./data/zookeeper_server.pid)
ZooKeeper JMX enabled by default
Using config: /opt/zookeeper-3.4./bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
Centos7安装zookeeper的更多相关文章
- 1.centos7 安装zookeeper
1.安装jdk 1)查找jdk包: yum search java|grep jdk 2)安装: yum install -y java-1.8.0-openjdk.x86_64 2. 安装ZooKe ...
- CentOS7 安装zookeeper
本章介绍CentOS的初始配置与zookeeper的安装. www.apache.org/dist/上可以下载Hadoop整个生态环境的组件,我下的Zookeeper3.4.6版本 我一般都是在一个虚 ...
- linux centos7 安装zookeeper
linux 系统下 zookeeper 安装教程 1.下载安装包 1)进入安装目录 cd /home/install/ 2)下载 wget http://mirror.bit.edu.cn/apach ...
- centos7 安装zookeeper 集群
data 创建myid 设置1 zookeeper默认端口2181 同步端口 20881 和 30881 设置zoo.cfg文件
- 如何在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&zookeeper集群的搭建
一.centos7下安装zookeeper 1.zookeeper 下载地址 https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/ 2.安装步骤 ...
- linux(CentOS7) 之 zookeeper 下载及安装
下载 搜索apache ,进入apache官网(https://www.apache.org/)下载 选择downloads 下的distribution 点击archive site 找到zooke ...
- centos7 安装配置zookeeper
https://blog.csdn.net/AaronLin6/article/details/78438877 https://www.cnblogs.com/sxdcgaq8080/p/74924 ...
随机推荐
- Python中函数参数传递问题【转】
1. Python passes everything the same way, but calling it "by value" or "by reference& ...
- pat(B) 1037. 在霍格沃茨找零钱(水题)
代码: #include<cstdio> #include<iostream> #include<cstring> #include<algorithm> ...
- applicationContext.xml 文件头报错Referenced file contains errors
问题如下:原先运行正常的项目,突然在applicationContext.xml 文件头报错 内容:Referenced file contains errors (http://www.spring ...
- CSS3 稳固而知新: 居中
水平居中 transform: translateX(-50%); left: 50%; 垂直居中同理 transform: translateY(-50%); top:50%; 垂直水平 ...
- JavaScript之Date对象
Javascript中的Date类型是在Java.util.Date基础上创建的. 以1970年01月01日至今的毫秒数来保存时间. 要创建一个Date var now = new Date(); 也 ...
- oracle 插入记录,字段自动获取当前系统时间(YYYY-MM-DD HH24:MI:SS)
需求: 插入一条记录,要求自动获取当前日期,并且格式为(YYYY-MM-DD HH24:MI:SS) sql语句: insert into SY_COMM_CONFIG(CONF_ID, S_MTIM ...
- FreeBSD中实现root的ssh
在虚拟机中刚装好FreeBSD,结果不能以远程方式登录root,然后在如下链接中找到了解决方法: http://blog.chinaunix.net/uid-26719405-id-3822697.h ...
- 【ASP.NET】——AdRotator控件
AdRotator控件即广告控件. 广告,是站点不可缺少的一部分.也是站点获取收益的最主要途径,但最初制作广告非常麻烦.asp.net就将该方法封装成了一个控件.为我们节省了非常多时间.这也是ASP. ...
- go的sync.Map
sync.Map这个数据结构是线程安全的(基本类型Map结构体在并发读写时会panic严重错误),它填补了Map线程不安全的缺陷,不过最好只在需要的情况下使用.它一般用于并发模型中对同一类map结构体 ...
- Java基础04 封装与接口(转载)
数据成员和方法都是同时开放给内部和外部的.在对象内部,我们利用this来调用对象的数据成员和方法.在对象外部,比如当我们在另一个类中调用对象的时,可以使用 对象.数据成员 和 对象.方法() 来调用对 ...