You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
## 一、源码编译
1. 从github 下载源码包并用idea 打开, 注意: 这里不能使用提供的github release, 因为打出来的包版本有问题, 必须用源码包。( 另外官方提供的安装包不提供connector, 需要单独下载)
![[Pasted image 20250609141740.png]]
![[Pasted image 20250609141858.png]]
2. 检查 jdk 版本, 查看最外层pom.xml 文件java.version 标签
![[Pasted image 20250609142057.png]]
3. 设置jdk版本与pom文件要求版本相同
4. 在代码目录下执行命令,过程中如果有保存自行解决,大概率是环境问题
```shell
# 安装依赖
./mvnw install -Dmaven.test.skip
# 编译打包
mvn clean package -pl seatunnel-dist -am -Dmaven.test.skip= true
```
5. 查看打包
![[Pasted image 20250609142309.png]]
## 二、安装部署
因为使用源码编译, connector也在其中, 不用再次从网上下载。
对于升级来说只需要复制lib和config目录即可。
将tar包上传至服务器目录, 例如 /opt/datasophon
下面给出参考命令,自行替换路径及版本号
1. 替换lib
```shell
tar -zxvf apache-seatunnel-2.3.11-bin.tar.gz && cd /opt/datasophon/seatunnel/lib && zip -r lib.zip ./* && mv lib.zip /opt/datasophon/apache-seatunnel-2.3.11 && unzip -o /opt/datasophon/apache-seatunnel-2.3.11/lib.zip -d /opt/datasophon/apache-seatunnel-2.3.11/lib && rm -rf /opt/datasophon/apache-seatunnel-2.3.11/lib.zip && cd /opt/datasophon/apache-seatunnel-2.3.11
```
2. 替换config
```shell
cd /opt/datasophon/seatunnel/config && zip -r config.zip ./* && mv config.zip /opt/datasophon/apache-seatunnel-2.3.11 && unzip -o /opt/datasophon/apache-seatunnel-2.3.11/config.zip -d /opt/datasophon/apache-seatunnel-2.3.11/config && rm -rf /opt/datasophon/apache-seatunnel-2.3.11/config.zip && cd /opt/datasophon/apache-seatunnel-2.3.11
```
替换完成后记得检查配置和lib是否已存在
启动节点
1. 停止旧服务,自行替换目录及版本号
```shell
cd /opt/datasophon/seatunnel/bin && ./stop-seatunnel-cluster.sh && cd /opt/datasophon && mv seatunnel-2.3.8 seatunnel-2.3.8_bak && cd /opt/datasophon && mv apache-seatunnel-2.3.11 seatunnel-2.3.8
```
2. 启动新服务
```shell
# 启动master
cd /opt/datasophon/seatunnel/bin && ./seatunnel-cluster.sh -d -r master
# 启动worker
cd /opt/datasophon/seatunnel/bin && ./seatunnel-cluster.sh -d -r worker
```