分布式事务seata安装及启动
By:Roy.LiuLast updated:2021-04-19
尝试当前最新版seata1.41版的部署及启动
一. 下载seata
下载地址: https://github.com/seata/seata/releases/download/v1.4.1/seata-server-1.4.1.tar.gz
部署方式, 采用DB方式部署。所以需要相应的建表语句,建表语句可以在github上找到: https://github.com/seata/seata/blob/1.4.1/script/server/db/mysql.sql 我采用MySQL数据库作为测试
二,解压文件并配置数据库模式
解压 seata-server-1.4.1.tar.gz 压缩包,并修改 conf 下的 file.conf 文件 ,配置DB模式:
store { ## store mode: file、db、redis mode = "db" ## file store property file { ## store location dir dir = "sessionStore" # branch session size , if exceeded first try compress lockkey, still exceeded throws exceptions maxBranchSessionSize = 16384 # globe session size , if exceeded throws exceptions maxGlobalSessionSize = 512 # file buffer size , if exceeded allocate new buffer fileWriteBufferCacheSize = 16384 # when recover batch read size sessionReloadReadSize = 100 # async, sync flushDiskMode = async } ## database store property db { ## the implement of javax.sql.DataSource, such as DruidDataSource(druid)/BasicDataSource(dbcp)/HikariDataSource(hikari) etc. datasource = "druid" ## mysql/oracle/postgresql/h2/oceanbase etc. dbType = "mysql" driverClassName = "com.mysql.jdbc.Driver" url = "jdbc:mysql://127.0.0.1:3306/seata" user = "root" password = "" minConn = 5 maxConn = 100 globalTable = "global_table" branchTable = "branch_table" lockTable = "lock_table" queryLimit = 100 maxWait = 5000 } .....
注意里面MYSQL 相关的配置,需要自己手动建库,并导入建表SQL语句。
三. 建立GC 日志目录
在 bin 文件夹同级,建立 logs 目录。
四. 启动seata
我是在windows下测试的, 进入到 seata 目录下,执行 bin\seata-server.bat
From:一号门
Previous:mybatis-plus代码生成器
COMMENTS