Flink安装配置,单机版:
01.下载如下安装包flink-1.6.3-bin-hadoop27-scala_2.:
(SSpark) root@LAPTOP-P1LA53KS:/mnt/e# ls -al
ls: 'System Volume Information': Permission denied
ls: WindowsApps: Permission denied
total 1786428
drwxrwxrwx 1 root root 4096 Jan 16 11:19 '$'
drwxrwxrwx 1 root root 4096 Jan 18 23:25 .
drwxr-xr-x 1 root root 4096 Jan 16 15:08 ..
drwxrwxrwx 1 root root 4096 Jan 16 14:47 DeliveryOptimization
drwxrwxrwx 1 root root 4096 Jan 16 14:44 Gadaite
drwxrwxrwx 1 root root 4096 Jan 18 19:28 KafkaData
drwxrwxrwx 1 root root 4096 Jan 19 16:16 KafkaLogs
-rwxrwxrwx 1 root root 94235922 Jul 5 2021 Miniconda3-latest-Linux-x86_64.sh
dr-xr-xr-x 1 root root 4096 Jan 16 14:44 'Program Files'
drwxrwxrwx 1 root root 4096 Apr 17 2014 Scala-2.11.0
d--x--x--x 1 root root 4096 Jan 16 17:17 'System Volume Information'
d--x--x--x 1 root root 4096 Jan 16 14:47 WindowsApps
dr-xr-xr-x 1 root root 4096 Jan 16 14:47 WpSystem
drwxrwxrwx 1 root root 4096 Jan 19 12:57 ZookeeperData
drwxrwxrwx 1 root root 4096 Jan 16 15:37 conda-env
-rwxrwxrwx 1 root root 27816900 Jul 5 2021 docker-17.03.
drwxrwxrwx 1 root root 4096 Dec 18 2018 flink-1.6.3
-rwxrwxrwx 1 root root 301611742 Jan 18 23:23 flink-1.6.3-bin-hadoop27-scala_2.
drwxrwxrwx 1 root root 4096 Jan 19 00:42 hadoop-2.7.7
-rwxrwxrwx 1 root root 218720521 Jan 2 20:14 hadoop-2.7.
drwxrwxrwx 1 root root 4096 Jan 16 19:55 javawin
drwxrwxrwx 1 root root 4096 Jan 16 15:36 jdk1.8-linux-64位
drwxrwxrwx 1 root root 4096 Jan 18 20:13 kafka_2.11-2.4.0
-rwxrwxrwx 1 root root 70057083 Jan 18 19:05 kafka_2.11-2.4.
-rwxrwxrwx 1 root root 498831872 Jul 5 2021
-rwxrwxrwx 1 root root 321790464 Jul 5 2021
-rwxrwxrwx 1 root root 26007395 Jan 2 19:03 scala-2.11.
drwxrwxrwx 1 root root 4096 Feb 3 2020 spark-2.4.5-bin-hadoop2.7
-rwxrwxrwx 1 root root 232530699 Feb 3 2020 spark-2.4.5-bin-hadoop2.
drwxrwxrwx 1 root root 4096 Mar 7 2019 zookeeper-3.4.14
-rwxrwxrwx 1 root root 37676320 Jan 18 18:34 zookeeper-3.4.
drwxrwxrwx 1 root root 4096 Jan 16 15:37 配置Jars
02.解压安装,生成文件flink-1.6.3:
(SSpark) root@LAPTOP-P1LA53KS:/mnt/e# tar zxvf flink-1.6.3-bin-hadoop27-scala_2.
03.修改flink配置:
# 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.
# dataDir=/tmp/zookeeper
# The port at which the clients will connect
clientPort=2181
# ZooKeeper quorum peers
server.1=localhost:2888:3888
# server.2=host:peer-port:leader-port
(SSpark) root@LAPTOP-P1LA53KS:/mnt/e/flink-1.6.3/conf# pwd
/mnt/e/flink-1.6.3/conf
04.启动flink
(SSpark) root@LAPTOP-P1LA53KS:/mnt/e/flink-1.6.3/bin# ls
flink
(SSpark) root@LAPTOP-P1LA53KS:/mnt/e/flink-1.6.3/bin# ./
05.添加到环境变量:
(SSpark) root@LAPTOP-P1LA53KS:/mnt/e/flink-1.6.3/bin# tail -10f /etc/profile
export ZOOKEEPER_HOME=/mnt/e/zookeeper-3.4.14
export PATH=$ZOOKEEPER_HOME/bin:$PATH
#kafka
export KAFKA_HOME=/mnt/e/kafka_2.11-2.4.0
export PATH=$KAFKA_HOME/bin:$PATH
#flink
export FLINK_HOME=/mnt/e/flink-1.6.3
export PATH=$FLINK_HOME/bin:$PATH