https://www.gravatar.com/avatar/dfba7b9af4258f14b883b676b32bf3db?s=240&d=mp

爱宝儿

游戏开发及物联网大数据集群维护及部署开发,数据存储及相关设计,大数据、ETL、Flink、kafka,hadoop框架等多种技术开>发技术。涵盖语言涉及Java、Go、Python、C、C#等。

仅供学习参考

linux¢os时间同步

../../images/weixin_public.png

时间同步相关命令Centos

1
2
3
4
5
6
7
8
sudo systemctl start ntpd     #启动时间同步程序
sudo systemctl enable ntpd  #允许时间同步程序开机启动

sudo timedatectl set-ntp yes

client
systemctl restart ntpd
systemctl enable ntpd.service

zookeeper 优化配置文件

../../images/weixin_public.png

zoo.cfg

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
tickTime=2000

initLimit=10

syncLimit=5

dataDir=/bigdata/zzwl/zookeeper/data

clientPort=2181

maxClientCnxns=60
maxClientCnxns=300
skipACL=true

#metricsProvider.className=org.apache.zookeeper.metrics.prometheus.PrometheusMetricsProvider
#metricsProvider.httpPort=7000
#metricsProvider.exportJvmInfo=true

server.1=bigdata01:2888:3888
server.2=bigdata02:2888:3888
server.3=bigdata03:2888:3888
1
2
3
4
dataDir目录下  

touch  myid
echo "1" >> myid

Zookeeper单机环境和集群环境搭建

../../images/weixin_public.png

Zookeeper单机环境和集群环境搭建

一、单机环境搭建

1.1 下载

下载对应版本 Zookeeper,这里我下载的版本 3.4.14。官方下载地址:https://archive.apache.org/dist/zookeeper/