一:下載安裝(前提jdk安裝成功)
版本選擇:1.7.2,不集成其它組件。
下載網址:https://flink.apache.org/downloads.html
格式:flink-1.7.2-bin-scala_2.11.tgz
解壓縮:tar -zxvf flink-1.7.2-bin-scala_2.11.tgz
配置環境變量:cd ~
vim .bash_profile
export FLINK_HOME=/home/alex/soft/flink
export PATH=$FLINK_HOME/bin:$PATH
export PATH
source .bash_profile
二:提交任務
啟動flink:./bin/start-cluster.sh
查看WebUi:ip:8081,端口默認為8081
提交任務(socketwordcount)簡單測試:
說明:基於流式的單詞統計
1.啟動9999端口
nc -l 9999
2.提交任務
flink run examples/streaming/SocketWindowWordCount.jar --port 9999