普元数据开发平台 普元数据开发平台
产品介绍
安装部署
快速入门
操作指南
应用集成
FAQ
  • SeaTunnel安装指南
  • 方式一:单节点解压安装
  • 1. 解压 seatunnel
  • 2. 修改配置文件
  • 3. 修改拥有者
  • 4.启动停止Seatunnel Server
  • 方式二:集群部署安装
  • 1. 解压 Seatunnel
  • 2. 修改 install_env.sh 脚本
  • 3. 集群安装
  • 4.启动停止Seatunnel 集群
  • Seatunnel运维操作(可选)

# SeaTunnel安装指南

Seatunnel 提供两种使用方式:

  • 解压安装:单节点安装时推荐使用;
  • 集群部署安装:多节点安装时推荐使用。

介质名称:apache-seatunnel-7.1.0-bin.tar.gz

# 方式一:单节点解压安装

Seatunnel 单节点部署时需要和 DolphinScheduler 的worker节点部署在同一台服务器。(Seatunnel 既作为客户端提交任务也作为服务端运行任务)

# 1. 解压 seatunnel

tar -zxvf apache-seatunnel-7.1.0-bin.tar.gz -C /home/seatunnel

# 2. 修改配置文件

  1. 编辑 ${SEATUNNEL_HOME}/config/hazelcast.yaml 文件,修改member-list参数值为单节点ip或域名。
    说明:

    本安装示例的文件路径为:/home/seatunnel/apache-seatunnel-7.1.0/config/hazelcast.yaml

vim /home/seatunnel/apache-seatunnel-7.1.0/config/hazelcast.yaml

hazelcast:
  cluster-name: seatunnel
  network:
    rest-api:
      enabled: true
      endpoint-groups:
        CLUSTER_WRITE:
          enabled: true
        DATA:
          enabled: true
    join:
      tcp-ip:
        enabled: true
        member-list:
          - 192.168.16.190
    port:
      auto-increment: false
      port: 5801
  properties:
    hazelcast.invocation.max.retry.count: 20
    hazelcast.tcp.join.port.try.count: 30
    hazelcast.logging.type: log4j2
    hazelcast.operation.generic.thread.count: 100

hazelcast.yaml

  1. 编辑 ${SEATUNNEL_HOME}/config/hazelcast-client.yaml文件,修改cluster-members参数值为单节点ip或域名。
    说明:

    本安装示例的文件路径为:/home/seatunnel/apache-seatunnel-7.1.0/config/hazelcast-client.yaml

vim /home/seatunnel/apache-seatunnel-7.1.0/config/hazelcast-client.yaml

hazelcast-client:
  cluster-name: seatunnel
  properties:
    hazelcast.logging.type: log4j2
  network:
    cluster-members:
      - 192.168.16.190:5801

hazelcast-client.yaml

  1. 编辑 ${SEATUNNEL_HOME}/config/seatunnel.yaml文件,修改fs.defaultFS参数。本手册中文件路径为:/home/seatunnel/apache-seatunnel-7.1.0/config/seatunnel.yaml

vim /home/seatunnel/apache-seatunnel-7.1.0/config/seatunnel.yaml

  • 当使用 HDFS 存储文件时,修改 fs.defaultFS 值为 hdfs 路径
storage.type: hdfs
fs.defaultFS: hdfs://localhost:9000
  • 当使用 LocalFile 存储文件时,修改 fs.defaultFS 值为服务器的本地路径
storage.type: hdfs
fs.defaultFS: file:///

# 3. 修改拥有者

chown -R dws:dws /home/seatunnel

# 4.启动停止Seatunnel Server

启动 Seatunnel Server 命令:

su dws cd /home/seatunnel/apache-seatunnel-7.1.0 ./start-standalone.sh

停止 Seatunnel Server 命令:

su dws cd /home/seatunnel/apache-seatunnel-7.1.0 ./stop-standalone.sh

# 方式二:集群部署安装

前置条件:集群机器已配置免密登录。安装必读

# 1. 解压 Seatunnel

tar -zxvf apache-seatunnel-7.1.0-bin.tar.gz -C /opt/

chown -R dws:dws /opt/apache-seatunnel-7.1.0

# 2. 修改 install_env.sh 脚本

修改 install/install_env.sh 脚本中的ips和installPath参数值为需要集群部署的机器地址和安装路径。

vim install/install_env.sh
ips=${ips:-"192.168.16.190,192.168.16.191"}

serverIps=${serverIps:-"192.168.16.190,192.168.16.191"}  #指定哪些服务器作为server端

serverPort=${serverPort:-"5801"}

sshPort=${sshPort:-"22"}

clientXms=${clientXms:-"256m"}
clientXmx=${clientXmx:-"512m"}

serverXms=${serverXms:-"2g"}
serverXmx=${serverXmx:-"4g"}

installPath=${installPath:-"/home/seatunnel/apache-seatunnel-7.1.0"}

deployUser=${deployUser:-"dws"}

install_env_seatunnel

# 3. 集群安装

install/install.sh脚本,自动在集群机器上安装seatunnel并启动。

su dws
./install/install.sh

seatunnel-install-cluster

image-20250527184547957

# 4.启动停止Seatunnel 集群

启动seatunnel 集群命令:

su dws cd /home/seatunnel/apache-seatunnel-7.1.0 ./start-cluster.sh

停止seatunnel 集群命令:

su dws cd /home/seatunnel/apache-seatunnel-7.1.0 ./stop-cluster.sh

提示:

停止集群中的某个节点可以在对应服务器上执行 ./stop-standalone.sh 脚本。

# Seatunnel运维操作(可选)

  1. 使用tail 命令动态查看Seatunnel 运行日志。

    tail -200f ${Seatunnel安装目录}/logs/seatunnel-engine-server.log
    
  2. 查询运行中任务列表

    cd  ${Seatunnel安装目录}
    ./bin/seatunnel.sh -l
    

    image-20241209153844938

  3. 若需要手动停止seatunnel任务,使用如下命令

    cd  ${Seatunnel安装目录}
    ./bin/seatunnel.sh -can ${Job ID}  	 	#Job ID可使用./bin/seatunnel.sh -l查看
    

← Zookeeper安装指南(可选) Primeton DI安装指南 →