天天看点

SpringCloudAlibaba之分布式事务Seata 1.5.2服务端配置

作者:被鱼吃的喵咪

Seata服务端启动的时候要注意内存问题,这是使用的seata版本:1.5.2,解压缩后结构

SpringCloudAlibaba之分布式事务Seata 1.5.2服务端配置

bin:目录放置了seata服务启动脚本

conf:目录放置seata服务配置项

1、进入/usr/local/scion/seata/conf目录修改application.yml

SpringCloudAlibaba之分布式事务Seata 1.5.2服务端配置

Dockerfile:顾名思义,这里可以将seata服务打包成镜像,使用docker启动,这里不做展开

script:这个目录比较重要,放置了配置中心的相关配置,以及一些数据源脚本,展开目录如下图

SpringCloudAlibaba之分布式事务Seata 1.5.2服务端配置

使用到了配置中心nacos、数据库mysql,需要做些准备配置

1、将/usr/local/scion/seata/script/server/db目录下的mysql.sql导入自己的mysql数据库

2、将/usr/local/scion/seata/script/config-center/nacos运行nacos-config-interactive.sh进行交互式配置

上述操作配置完毕后:进入bin目录执行seata启动命令

seata-server.sh -h 127.0.0.1 -p 8091 -m db           

进入logs目录下查看启动日志:

SpringCloudAlibaba之分布式事务Seata 1.5.2服务端配置
SpringCloudAlibaba之分布式事务Seata 1.5.2服务端配置

继续阅读