Seata1.8.0安装部署流程linux

1.下载安装包

下载地址 https://github.com/apache/incubator-seata/releases

2.上传安装包到服务器

将压缩包放到指定目录下 比如 /opt

解压 tar -zxvf seata-server-1.8.0.tar.gz

3.配置seata服务

进入到 seata/conf 目录

修改application.yml文件

bash 复制代码
vim application.yml

修改相关配置

yaml 复制代码
#  Copyright 1999-2019 Seata.io Group.
#
#  Licensed under the Apache License, Version 2.0 (the "License");
#  you may not use this file except in compliance with the License.
#  You may obtain a copy of the License at
#
#  http://www.apache.org/licenses/LICENSE-2.0
#
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.

server:
  port: 7091

spring:
  application:
    name: seata-server

logging:
  config: classpath:logback-spring.xml
  file:
    path: /opt/seata/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
    name: file.conf
  registry:
    # support: nacos, eureka, redis, zk, consul, etcd3, sofa
    type: eureka
    eureka: 
      serviceUrl: "http://127.0.0.1:8761/eureka"
      application: "seata-server"
      weight: "1"
  store:
    # support: file 、 db 、 redis
    mode: file
#  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,/**/*.jpeg,/**/*.ico,/api/v1/auth/login

修改完成后 :wq保存

4.新建file.conf文件

同样在seata/conf 目录

bash 复制代码
touch file.conf

修改file.conf

bash 复制代码
vim file.conf
java 复制代码
## transaction log store, only used in seata-server
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 = "hikari"
    ## mysql/oracle/postgresql/h2/oceanbase etc.
    dbType = "mysql"
    driverClassName = "com.mysql.cj.jdbc.Driver"
    url = "jdbc:mysql://127.0.0.1:3306/seata?useSSL=true&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&autoReconnect=true&failOverReadOnly=false&allowMultiQueries=true&serverTimezone=GMT%2B8"
    user = "root"
    password = "Hatech1618!@#"
    minConn = 5
    maxConn = 100
    globalTable = "global_table"
    branchTable = "branch_table"
    lockTable = "lock_table"
    queryLimit = 100
    maxWait = 5000
  }

  ## redis store property
  redis {
    host = "127.0.0.1"
    port = "6379"
    password = ""
    database = "0"
    minConn = 1
    maxConn = 10
    maxTotal = 100
    queryLimit = 100
  }

}

5.启动seata

进入seata/bin 目录

执行命令

bash 复制代码
nohup ./seata-server.sh -p 8091 -h (seata所在服务器的ip)  > seata.log 2>&1 &
相关推荐
s_little_monster42 分钟前
【Linux】网络--传输层--UDP协议
linux·运维·服务器·笔记·学习·udp·学习方法
charlie1145141913 小时前
Linux内核深入学习(4)——内核常见的数据结构之链表
linux·数据结构·学习·链表·内核
pp-周子晗(努力赶上课程进度版)3 小时前
【Linux】利用多路转接epoll机制、ET模式,基于Reactor设计模式实现
服务器·网络·设计模式
九月镇灵将3 小时前
Ubuntu服务器部署多语言项目(Node.js/Python)方式实践
服务器·ubuntu·node.js·screen·supervisor
L汐3 小时前
05 部署Nginx反向代理
运维·nginx·github
南方以南_4 小时前
CentOS相关操作hub(更新中)
linux·运维·centos
明天不下雨(牛客同名)4 小时前
介绍一下 MVCC
java·服务器·数据库
一只小灿灿4 小时前
Flask 与 Django 服务器部署
服务器·django·flask
Clownseven4 小时前
[安全清单] Linux 服务器安全基线:一份可以照着做的加固 Checklist
linux·服务器·安全
熊猫在哪5 小时前
野火鲁班猫(arrch64架构debian)从零实现用MobileFaceNet算法进行实时人脸识别(一)conda环境搭建
linux·人工智能·python·嵌入式硬件·神经网络·机器学习·边缘计算