一、搭建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