分布式事务seata安装及启动

摘要: 尝试当前最新版seata1.41版的部署及启动

尝试当前最新版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

上一篇: mybatis-plus代码生成器
下一篇: maven工程多依赖情况下 程序包 不存在问题
 评论 ( What Do You Think )
名称
邮箱
网址
评论
验证
   
 

 


  • 微信公众号

  • 我的微信

站点声明:

1、一号门博客CMS,由Python, MySQL, Nginx, Wsgi 强力驱动

2、部分文章或者资源来源于互联网, 有时候很难判断是否侵权, 若有侵权, 请联系邮箱:summer@yihaomen.com, 同时欢迎大家注册用户,主动发布无版权争议的 文章/资源.

3、鄂ICP备14001754号-3, 鄂公网安备 42280202422812号