SeaTunnel Web 在Ubuntu环境的安装
目录下载软件
下载SeaTunnel二进制文件
下载地址:https://seatunnel.apache.org/download/
- apache-seatunnel-2.3.4-bin.tar.gz
- apache-seatunnel-web-1.0.0-bin.tar.gz
解压文件:
tar -xvf apache-seatunnel-2.3.4-bin.tar.gz
tar -xvf apache-seatunnel-web-1.0.0-bin.tar.gz
测试SeaTunnel任务
运行示例任务:
cd apache-seatunnel-2.3.4
./bin/seatunnel.sh --config ./config/v2.batch.config.template -e local
注:因为seatunnel源码的问题,在Linux环境执行需要批量替换代码换行符为Unix格式
find <seatunnel_home 路径> -type f -print0 | xargs -0 dos2unix --
下载连接器
连接器配置列表:
文件路径: apache-seatunnel-2.3.4/config/plugin_config
下载连接器插件:
bash bin/install-plugin.sh
或:
./bin/install-plugin.sh
注意: 不可以使用: sh bin/install-plugin.sh 以防解释器是 dash 而导致出错。
下载位置:
/opt/apache-seatunnel-2.3.4/connectors/seatunnel
启动客户端模式
./bin/seatunnel-cluster.sh -d
配置web元数据库
cd /opt/apache-seatunnel-web-1.0.0-bin
cat script/seatunnel_server_env.sh
配置数据库连接信息。
注:此账号需要有创建数据库权限
export HOSTNAME="127.0.0.1"
export PORT="3306"
export USERNAME="root"
export PASSWORD="123456"
安装MySQL客户端
sudo apt install mysql-client
测试数据库连接:
mysql -h 127.0.0.1 -P 3306 -u root -p
初始化数据库:
sh script/init_sql.sh
配置Web应用
配置文件路径:conf/application.yml
cat conf/application.yml
修改内容:
datasource:
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://192.168.8.101:3306/seatunnel?useSSL=false&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&allowPublicKeyRetrieval=true
username: root
password: 123456
配置 JAVA_HOME
echo "export JAVA_HOME=/path/to/java"
配置 SEATUNNEL_HOME
echo "export SEATUNNEL_HOME=/path/to/seatunnel"
echo "export PATH=$SEATUNNEL_HOME/bin:$PATH"
添加MySQL驱动
下载MySQL驱动并添加到lib目录
cp mysql-connector-j-8.2.0.jar apache-seatunnel-web-1.0.0-bin/libs/
添加连接器到Web
下载或编写 download_datasource.sh
下载地址: https://seatunnel.apache.org/assets/files/download_datasource-4b79e6fafe80459590a6a0fc2865e5ac.sh
文件放置路径:
cp download_datasource.sh apache-seatunnel-web-1.0.0-bin/bin/
下载连接器:
sh bin/download_datasource.sh
启动服务
sh bin/seatunnel-backend-daemon.sh start
页面测试
页面访问:
localhost:8801/
默认账号:
user: admin
password: admin
标签:bin,Web,SeaTunnel,seatunnel,sh,连接器,Ubuntu,apache
From: https://www.cnblogs.com/nookvoice/p/18029164