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.

46 lines
2.4 KiB

3 months ago
## 一、源码编译
2 months ago
1. 从github 下载源码包并用 idea 打开注意这里不能使用提供的github release因为打出来的包版本有问题必须用源码包。另外官方提供的安装包不提供connector需要单独下载
3 months ago
![[Pasted image 20250609141740.png]]
![[Pasted image 20250609141858.png]]
2. 检查 jdk 版本查看最外层pom.xml 文件java.version 标签
![[Pasted image 20250609142057.png]]
3. 设置jdk版本与pom文件要求版本相同
2 months ago
4. 在代码目录下执行命令,过程中如果报错自行解决,大概率是环境问题
3 months ago
```shell
# 安装依赖
./mvnw install -Dmaven.test.skip
# 编译打包
mvn clean package -pl seatunnel-dist -am -Dmaven.test.skip=true
```
5. 查看打包
![[Pasted image 20250609142309.png]]
## 二、安装部署
2 months ago
因为使用源码编译connector也在其中不用再次从网上下载。对于升级来说只需要复制上一版本的lib和config目录到新版本即可。
3 months ago
将tar包上传至服务器目录例如 /opt/datasophon
2 months ago
![[Pasted image 20250609143818.png]]
3 months ago
下面给出参考命令,自行替换路径及版本号
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
```
2 months ago
替换完成后记得检查配置和lib是否正确
3 months ago
启动节点
2 months ago
1. 停止旧服务并替换(自行替换目录及版本号)
3 months ago
```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
```