flink 系统自启
Last updated on November 22, 2024 pm
🧙 Questions
系统开机自动启动flink
必须写绝对路径,软连接路径不生效 /data/ispong/flink-1.14.0/
☄️ Ideas
sudo vim /usr/lib/systemd/system/flink.service
[Unit]
Description= Flink Service
[Service]
Environment=JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk
Type=forking
WorkingDirectory=/opt/flink
PermissionsStartOnly=true
ExecStart=cd /data/ispong/flink-1.14.0/bin/start-cluster.sh
ExecStop=/data/ispong/flink-1.14.0/bin/stop-cluster.sh
KillMode=none
Restart=always
[Install]
WantedBy=multi-user.target
# 刷新service
sudo systemctl daemon-reload
# 开启flink服务自启
sudo systemctl enable flink
sudo systemctl start flink
sudo systemctl stop flink
sudo systemctl status flink
🔗 Links
flink 系统自启
https://ispong.isxcode.com/hadoop/flink/flink 系统自启/