linux+nacos+seata1.6以上版本

一、搭建linux搭建nacos

这里就不详细搭建了具体请查看链接

二、linux下载安装jdk

这里就不展示了具体百度一下或者gpt一下

三、linux下载seata

1.下载Seata

下载地址:wget https://github.com/seata/seata/releases/download/v1.6.0/seata-server-1.6.0.tar.gz

解压:通过命令tar -zxvf (该解压的包)

2.初始化数据库脚本(MYSQL)

脚本目录在seata-1.6.0/script/server/db/mysql.sql下

3.配置application.yml(config文件下)

这里图省事我就直接复制下来了(注:高版本一定要配置console要不启动会报错浪费我半天时间)

console:
  user:
    username: seata
    password: seata
seata:
  config:
    type: nacos
    nacos:
      server-addr: 120.79.218.67:8848
      namespace: 00d3330e-205a-47e6-b9b9-39bd4416673f
      group: SEATA_GROUP
      username: nacos
      password: nacos
      context-path:
      data-id: seataServer.properties
  registry:
    type: nacos
    nacos:
      application: seata-server
      server-addr: 120.79.218.67:8848
      group: SEATA_GROUP
      namespace: 00d3330e-205a-47e6-b9b9-39bd4416673f
      cluster: default
      username: nacos
      password: nacos
      context-path:
  store:
    mode: db
    db:
      datasource: druid
      db-type: mysql
      driver-class-name: com.mysql.jdbc.Driver
      url: jdbc:mysql://120.79.218.67:3306/nacos?rewriteBatchedStatements=true
      user: root
      password: 12345678
      min-conn: 5
      max-conn: 100
      global-table: global_table
      branch-table: branch_table
      lock-table: lock_table
      distributed-lock-table: distributed_lock
      query-limit: 100
      max-wait: 5000    
  security:
    secretKey: SeataSecretKey0c382ef121d778043159209298fd40bf3850a017
    tokenValidityInMilliseconds: 1800000
    ignore:
      urls: /,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-fe/public/**,/api/v1/auth/login

四、配置nacos

(注:配置格式一定要勾选正确)

这里我简单配置一下(具体可以参考):

store.mode=db

store.db.datasource=druid

store.db.dbType=mysql

store.db.driverClassName=com.mysql.jdbc.Driver

store.db.url=jdbc:mysql://120.79.218.67:3306/nacos?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai

store.db.user=root

store.db.password=123456

store.db.minConn=5

store.db.maxConn=30

store.db.globalTable=global_table

store.db.branchTable=branch_table

store.db.queryLimit=100

store.db.lockTable=lock_table

store.db.maxWait=5000

详细内容可以参考/seata/script/config-center/config.txt

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值