11.Seata分布式事务服务的安装

一、服务的安装

1.网址

官网

Gitub

2.根据spring cloud alibaba版本说明选择对应服务器版本




3.下载服务端配置用到的资源



4.创建数据库,并导入数据表结构(注:1.5.1使用mysql5.7的数据库,1.5.2之后才支持mysql8)


解压第三步下载的资源,进入script\server\db目录,执行mysql.sql



5.根据官网文档修改存储方式为DB

查看参数说明


修改conf/application.yml文件



server:
  port: 7091

spring:
  application:
    name: seata-server

logging:
  config: classpath:logback-spring.xml
  file:
    path: ${user.home}/logs/seata
  extend:
    logstash-appender:
      destination: 127.0.0.1:4560
    kafka-appender:
      bootstrap-servers: 127.0.0.1:9092
      topic: logback_to_logstash

console:
  user:
    username: seata
    password: seata

seata:
  config:
    # support: nacos, consul, apollo, zk, etcd3
    type: file
  registry:
    # support: nacos, eureka, redis, zk, consul, etcd3, sofa
    type: file
  store:
    # support: file 、 db 、 redis
    mode: db
    db:
      driver-class-name: com.mysql.jdbc.Driver
      url: jdbc:mysql://127.0.0.1:3305/seata-server?serverTimezone=UTC&characterEncoding=utf-8
      user: root
      password: 123456
#  server:
#    service-port: 8091 #If not configured, the default is '${server.port} + 1000'
  security:
    secretKey: SeataSecretKey0c382ef121d778043159209298fd40bf3850a017
    tokenValidityInMilliseconds: 1800000
    ignore:
      urls: /,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-fe/public/**,/api/v1/auth/login

6.启动并访问(用户密码都是:seata)




(1)