0


Flink 1.18.1 部署与配置[CentOS7]

静态IP设置

# 修改网卡配置文件vim /etc/sysconfig/network-scripts/ifcfg-ens33
 
# 修改文件内容TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
IPADDR=192.168.18.128
NETMASK=255.255.255.0
GATEWAY=192.168.18.2
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens33
UUID=2c2371f1-ef29-4514-a568-c4904bd11130
DEVICE=ens33
ONBOOT=true
DNS1=114.114.114.114
 
# 重启网络
systemctl restart network

Java8环境配置[CentOS7]

cd /usr/local/src
wget https://repo.huaweicloud.com/java/jdk/8u201-b09/jdk-8u201-linux-x64.tar.gz

tar-xzvf jdk-8u201-linux-x64.tar.gz -C /usr/local
 
 
#配置环境变量vim /etc/profile
#文末添加exportJAVA_HOME=/usr/local/jdk1.8.0_201
exportJRE_HOME=${JAVA_HOME}/jre
exportCLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
exportPATH=${JAVA_HOME}/bin:$PATHsource /etc/profile
java-versionjava version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM)64-Bit Server VM (build 25.201-b09, mixed mode)

Zookeeper单节点部署与配置

# 下载cd /usr/local/src
wget --no-check-certificate https://dlcdn.apache.org/zookeeper/zookeeper-3.9.1/apache-zookeeper-3.9.1-bin.tar.gz

# 解压安装tar-xzvf apache-zookeeper-3.9.1-bin.tar.gz -C /usr/local

# 配置配置文件cd /usr/local/apache-zookeeper-3.9.1-bin/
cp-r /usr/local/apache-zookeeper-3.9.1-bin/conf/zoo_sample.cfg /usr/local/apache-zookeeper-3.9.1-bin/conf/zoo.cfg

# 启停脚本
/usr/local/apache-zookeeper-3.9.1-bin/bin/zkServer.sh start
/usr/local/apache-zookeeper-3.9.1-bin/bin/zkServer.sh status
/usr/local/apache-zookeeper-3.9.1-bin/bin/zkServer.sh stop

Flink部署与配置


下载
cd /usr/local/src
wget --no-check-certifica https://mirrors.tuna.tsinghua.edu.cn/apache/flink/flink-1.18.1/flink-1.18.1-bin-scala_2.12.tgz

tar-xzvf flink-1.18.1-bin-scala_2.12.tgz -C /usr/local

修改配置
cd /usr/local/flink-1.18.1
vim /usr/local/flink-1.18.1/conf/flink-conf.yaml
# jobManager 的IP地址
jobmanager.rpc.address: 192.168.18.128
# JobManager 的端口号
jobmanager.rpc.port: 6123# JobManager 监控IP
jobmanager.bind-host: 0.0.0.0
# JobManager JVM heap 内存大小
jobmanager.memory.process.size: 1600m
# TaskManager 监控IP
taskmanager.bind-host: 0.0.0.0
# 配置为本机task节点ip地址,如测试环境有多个ip,则配置为集群中可以相互通信的ip
taskmanager.host: localhost
# TaskManager JVM heap 内存大小
taskmanager.memory.process.size: 1728m
# 每个 TaskManager 提供的任务 slots 数量大小,默认为1
taskmanager.numberOfTaskSlots: 2# 程序默认并行计算的个数,默认为1
parallelism.default: 4

rest.port: 8081
rest.address: 0.0.0.0

#  web服务绑定的address
rest.bind-address: 0.0.0.0

修改环境变量
vim /etc/profile

exportFLINK_HOME=/usr/local/flink-1.18.1
exportPATH=$FLINK_HOME/bin:$PATHsource /etc/profile

配置集群
# 配置集群主节点IP及端口vim /usr/local/flink-1.18.1/conf/masters
localhost:8081

# 配置从节点IPvim /usr/local/flink-1.18.1/conf/workers
localhost
localhost
localhost

启停脚本
/usr/local/flink-1.18.1/bin/start-cluster.sh

/usr/local/flink-1.18.1/bin/stop-cluster.sh

可视化页面
http://192.168.18.128:8081/

在这里插入图片描述

标签: flink 大数据

本文转载自: https://blog.csdn.net/qq_38179971/article/details/135981429
版权归原作者 You Only Live Once_2 所有, 如有侵权,请联系我们删除。

“Flink 1.18.1 部署与配置[CentOS7]”的评论:

还没有评论