当前位置:   article > 正文

Apache SeaTunnel (不含web) Window11 本机搭建(非源码)_seatunnel windows

seatunnel windows

启动环境

需要提前准备的(只提供作者试过且可行的方案)

  • window11
  • ubuntu20(wsl2) window11内置ubuntu的方式自行百度,此处不做陈述
  • jdk8
  • mysql8
  • navicat
  • vscode

环境准备不做过多陈述,以下是正式的安装启动步骤

SeaTunnel 2.3.3

资源准备

  1. 第一步: 创建文件夹 (话不多说,直接上图,按照红框所示创建即可)
    ​​​​在这里插入图片描述
    2.第二步: 下载二进制包,放到backend文件夹下

链接: apache-seatunnel-2.3.3-bin.tar.gz

SeaTunnel 服务端安装

备份 install-plugin.sh

install-plugin.sh 复制一份,更名为install-plugin.sh.bak
在这里插入图片描述

更改${SEATUNNEL_HOME}/mvnw 为mvn

在这里插入图片描述

项目根目录执行 sh bin/ install-plugin.sh 安装依赖

在这里插入图片描述

移动connectors/seatunnel下的所有jar到 lib目录

在这里插入图片描述

下载datasource

这里稍微带一下源码的东西,在源码里有下载datasource的脚本复制到bin下,如下图所示
在这里插入图片描述
我把脚本内容写在下面,可以自己创建

#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

#This script is used to download the connector plug-ins required during the running process.
#All are downloaded by default. You can also choose what you need.
#You only need to configure the plug-in name in config/plugin_config.

# get seatunnel web home
SEATUNNEL_WEB_HOME=$(cd $(dirname $0);cd ../;pwd)
DATASOURCE_DIR=${SEATUNNEL_WEB_HOME}/datasource

# If you don’t want to download a certain data source, you can delete the element below
datasource_list=(
  "datasource-plugins-api"
  "datasource-elasticsearch"
  "datasource-hive"
  "datasource-jdbc-clickhouse"
  "datasource-jdbc-hive"
  "datasource-jdbc-mysql"
  "datasource-jdbc-oracle"
  "datasource-jdbc-postgresql"
  "datasource-jdbc-redshift"
  "datasource-jdbc-sqlserver"
  "datasource-jdbc-starrocks"
  "datasource-jdbc-tidb"
  "datasource-kafka"
  "datasource-mysql-cdc"
  "datasource-s3"
  "datasource-sqlserver-cdc"
  "datasource-starrocks"
  "datasource-mongodb"
)

# the datasource default version is 1.0.0, you can also choose a custom version. eg: 1.1.2:  sh install-datasource.sh 2.1.2
version=1.0.0

if [ -n "$1" ]; then
    version="$1"
fi

echo "Downloading SeaTunnel Web Datasource lib, usage version is ${version}"

# create the datasource directory
if [ ! -d "$DATASOURCE_DIR" ];
  then
      mkdir -p "$DATASOURCE_DIR"
      echo "Created datasource directory."
fi

for i in "${datasource_list[@]}"
do
	echo "$i"
	echo "Downloading datasource: " "$i"
  "$SEATUNNEL_WEB_HOME"/mvnw dependency:get -DgroupId=org.apache.seatunnel -DartifactId="$i" -Dversion="$version" -Ddest="$DATASOURCE_DIR"
done

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71

替换脚本的下载路劲,下载到之前创建的datasource目录中去

具体路径自定,只要能找到就行,然后同理,执行这个脚本
在这里插入图片描述

将下载的jar包复制到lib中去

在这里插入图片描述

在这里插入图片描述

然后最后我们来一个简单的全量同步

创建一个任务文件

如图
在这里插入图片描述
连通性自检哈

执行任务文件
./bin/seatunnel.sh --config config/txz/mysql_demo_1.config.template -e local
  • 1

最后观察数据库同步情况即可

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/不正经/article/detail/454706
推荐阅读
相关标签
  

闽ICP备14008679号