ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

Zookeeper配置安装步骤

2021-10-31 20:33:04  阅读:198  来源: 互联网

标签:zookeeper 10.4 步骤 Zookeeper number 3888 cfg 安装


1. 下载Zookeeper

下载zookeeper3.4.6,上传,解压到/opt

2. Zookeeper配置安装

1.进入zookeeper/conf,cp zoo_sample.cfg zoo.cfg
,修改zoo.cfg

[root@BaseNode conf]# vim zoo.cfg 

# The number of milliseconds of each tick
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=/var/tdp/zookeeper
# the port at which the clients will connect
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

#设置服务器内部通讯地址和节点,给zookeeper使用的#ps:注意这里的名字要和主机名一致
server.1=BaseNode:2888:3888
server.2=zknode1:2888:3888
server.3=zknode2:2888:3888
server.4=zknode3:2888:3888
~                          

3. 在/var/bdp/zookeeper下创建myid文件

以此在每个虚拟机下存入和server.num相同的数字。

4.修改/etc/hosts文件

10.4.17.100 BaseNode
10.4.17.101 zknode1
10.4.17.102 zknode2
10.4.17.103 zkNode3                                                             

5. 修改zookeeper环境变量配置

vim /etc/profile
在文件末尾添加:

#Zookeeper
export ZOOKEEPER_HOME=/opt/zookeeper-3.4.6
export PATH=$PATH:$ZOOKEEPER_HOME/bin

保存source /etc/profile.

6. 大功告成,试一下吧

zkServer.sh restart/start
再看一下运行状态,zkServer.sh status

停止机群,zkServer.sh stop

标签:zookeeper,10.4,步骤,Zookeeper,number,3888,cfg,安装
来源: https://www.cnblogs.com/heybazinga/p/15490682.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有