您的位置:时时app平台注册网站 > 时时app平台注册网站 > Linux 安装Zookeeper<单机版>(使用Mac远程访问)

Linux 安装Zookeeper<单机版>(使用Mac远程访问)

2019-11-08 02:07

  关闭

  cp /usr/local/zookeeper/zookeeper-3.4.12/conf/zoo_sample.cfg /usr/local/zookeeper/zookeeper-3.4.12/conf/zoo.cfg

如打字与印刷如下新闻则注明运转成功:

  启动

三 在三台服务器上分别运转Zookeeper

5、进入到 /usr/local/services/zookeeper/zookeeper-3.4.9/conf 目录中:

新建目录

zookeeper集群节点建议是奇数

Starting zookeeper ... STARTED

开卷本文供给先读书安装Zookeeper<准备>

编辑(39.108.121.137服务器上内容是1  120.77.148.101服务器上内容是2  39.108.162.184服务器上内容是3)

ZooKeeper JMX enabled by default

  mkdir /usr/local/zookeeper/zookeeper-3.4.12/data

 

cp zoo_sample.cfg zoo.cfg

    ./zkServer.sh status

  查看情状(三台zookeeper运转达成后过一会再查看)

Stopping zookeeper ... STOPPED

    ./zkServer.sh stop

    ./zkServer.sh start

Using config: /usr/local/services/zookeeper/zookeeper-3.4.9/bin/../conf/zoo.cfg

图片 1

  cd /usr/local/zookeeper/zookeeper-3.4.12/bin

vim /etc/profile

编辑(根据key修改value)

  tar -xvf zookeeper-3.4.12.tar.gz -C /usr/local/zookeeper

10、用 vim 张开 /etc/ 目录下的安插文件 profile:

解压

# 数据保存目录
dataDir=/usr/local/zookeeper/zookeeper-3.4.12/data
# 客户端连接zookeeper端口
clientPort=2181
# 云服务器需要额外添加
quorumListenOnAllIPs=true
# 2881:zookeeper节点之间通信端口 3881:zookeeper节点之间投票选举端口
server.1=39.108.121.137:2881:3881
server.2=120.77.148.101:2881:3881
server.3=39.108.162.184:2881:3881
# 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

  tar -xvf zookeeper-3.4.12.tar.gz -C /usr/local/zookeeper

 

Using config: /usr/local/services/zookeeper/zookeeper-3.4.9/bin/../conf/zoo.cfg

  cd /usr/local/zookeeper/zookeeper-3.4.12/bin

 

 

进入bin目录

zookeeper集群依照投投票大选举的建制 选出leader和follower

ZooKeeper JMX enabled by default

  cp /usr/local/zookeeper/zookeeper-3.4.12/conf/zoo_sample.cfg /usr/local/zookeeper/zookeeper-3.4.12/conf/zoo.cfg

  mkdir /usr/local/zookeeper

13、查询 zookeeper 状态:

  mkdir /usr/local/zookeeper

  vim /usr/local/zookeeper/zookeeper-3.4.12/data/myid

11、使 /etc/ 目录下的 profile 文件就可以以预知效:

配置文件策画

  mkdir /usr/local/zookeeper/zookeeper-3.4.12/data

#idea - zookeeper-3.4.9 config start - 2017-12-09
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 end - 2017-12-09

新建目录

  cd zookeeper压缩包所在目录

cd /usr/local/services/zookeeper

  vim /usr/local/zookeeper/zookeeper-3.4.12/conf/zoo.cfg

新建文件

source /etc/profile

  cd zookeeper压缩包所在目录

  touch /usr/local/zookeeper/zookeeper-3.4.12/data/myid

 集群配置:

 

解压

并在其尾巴部分扩充如下内容:

# 数据保存目录
dataDir=/usr/local/zookeeper/zookeeper-3.4.12/data

读书本文要求先读书安装Zookeeper<准备>

12、启动 zookeeper 服务:

    ./zkServer.sh start

二 在三台服务器上分别安装Zookeeper

图片 2

  查看情形

  vim /usr/local/zookeeper/zookeeper-3.4.12/conf/zoo.cfg

7、用 vim 展开 zoo.cfg 文件并改过其剧情为如下:

新建目录

14、关闭 zookeeper 服务:

安顿文件准备

ZooKeeper JMX enabled by default

39.108.121.137  120.77.148.101  39.108.162.184

cd zookeeper-3.4.9/conf/

豆蔻年华 架构细节

Using config: /usr/local/services/zookeeper/zookeeper-3.4.9/bin/../conf/zoo.cfg

    ./zkServer.sh status

6、复制 zoo_sample.cfg 文件的并取名叫为 zoo.cfg:

新建目录

zkServer.sh stop

这里自个儿筹算了3台服务器

tar -zxvf zookeeper-3.4.9.tar.gz

进入bin目录

cd ../bin/

  启动

如打字与印刷如下音信则评释成功关闭:

编辑(根据key修改value)

图片 3

实操如下:

ZooKeeper JMX enabled by default

4、解压缩 zookeeper-3.4.9.tar.gz:

zkServer.sh start

Using config: /usr/local/services/zookeeper/zookeeper-3.4.9/bin/../conf/zoo.cfg

Using config: /usr/local/services/zookeeper/zookeeper-3.4.9/bin/../conf/zoo.cfg

Starting zookeeper ... STARTED

9、进入到 /usr/local/services/zookeeper/zookeeper-3.4.9/bin 目录中:

ZooKeeper JMX enabled by default

2、进入到 /usr/local/services/zookeeper 目录中:

8、保存并关闭 zoo.cfg 文件:

如打字与印刷如下消息则注明重启成功:

3、下载 zookeeper-3.4.9.tar.gz:

wget

zkServer.sh restart

mkdir -p /usr/local/services/zookeeper

1、创建 /usr/local/services/zookeeper 文件夹:

zkServer.sh status

Stopping zookeeper ... STOPPED

15、重启 zookeeper 服务:

本文由时时app平台注册网站发布于时时app平台注册网站,转载请注明出处:Linux 安装Zookeeper&lt;单机版&gt;(使用Mac远程访问)

关键词: