当前位置:网站首页>Seata installing the window environment
Seata installing the window environment
2022-06-10 18:46:00 【-Bruce Lee】
One 、 Introduce
Seata Is an open source distributed transaction solution , Committed to providing high-performance and easy-to-use distributed transaction services .Seata Will provide users with AT、TCC、SAGA and XA Transaction mode , Create a one-stop distributed solution for users .
Chinese official website Deployment Guide
Two 、 download
Get into Seata On the download page, select the version to download . I downloaded it here 1.3.0 edition , The following configuration is based on this version description .
3、 ... and 、 To configure
1. Server storage mode configuration
Server End storage mode existing file、db、redis Three .
- file The mode does not need to be changed , Just start it directly .file Mode is stand-alone mode , Read and write global transaction session information in memory and persist local files root.data, Higher performance ;
- db The mode is high availability mode , Global transaction session information through db share , The corresponding performance is worse ;
- redis Pattern Seata-Server 1.3 And above support , Higher performance , There is a risk of loss of transaction information , Please configure the appropriate redis Persistent configuration .
Profile location : Under the installation package /conf / file.conf, See the screenshot below for the original document 
The original configuration file mode is file File mode , Optional configuration DB,Redis Pattern , Here we configure the common mode DB. Switch DB Mode time , Pay attention to the database version used , The default configured database driver here is 8.0 Under version , If it is 8.0 The above version of the database , The driver name needs to be changed .
The database is configured here , Then you need to create corresponding libraries and related tables .
2. DB Patterns create databases
Seata The official database script , Just download and import the database , The script is in the source code Script Under the folder , see Seata-Script, stay Deployment Guide There are also hints in the documentation :

server In file db There are database scripts , Execute the corresponding script .
Here is the stand-alone version seata It's set up , Can be in bin Execute script under file seata-server.bat, You can run seata Service for .
But in practice , We usually build a highly available seata colony , Use with the registry , Such as Nacos, Multiple seata Service cluster , Will consider load balancing , Above we will seata Client configuration, such as storage configuration DB They are all local files , When using a cluster , A configuration change needs to go to each seata The server changes the file , Inefficient and error prone , These configurations can be registered in Nacos in , utilize Nacos To each seata Load balancing , And unified management seata Configuration of .
3. Registry configuration
The client, that is, the transaction participant, needs and seata The transaction coordinator communicates , Recommended here Nacos Registry Center ,seata Service registered to Nacos In the after , The corresponding load balancing operation can be performed .
The location of the configuration file is the same as the server storage configuration : Under the installation package /conf / registry.conf
4. Configuration center configuration
seata The server configuration file information of is as set above DB Configuration and some other configurations , You can also put Nacos in , By default, these configurations are local /conf / file.conf In file , When we build seata When the cluster , Can share Nacos Medium seata To configure .
The configuration file location is the same as the registry configuration : Under the installation package /conf / registry.conf
So you're going to have to seata The configuration in is registered to Nacos in ,seata For the configuration of the configuration center, similar MySQL Script for , Also in resources , stay Script Under the document config-center / config.txt In file 
open seata You can see many configuration items in the provided configuration file , Most of these are the default configurations and do not need to be changed ( You can delete ), You only need to change the storage configuration for the server to DB Pattern , Stored in MySQL in , This configuration is described above /conf / file.conf The file has been changed once , Here we just need the same changes .
Configuration change completed , But ultimately, you have to register in Nacos in ,seata Here is also a script for registration , You can register the configuration file to Nacos in , In the configuration file directory , You can see seata Provides a variety of registry tools , There are corresponding scripts in it .
stay Nacos There is shell and python Script , Here we use shell Script , But in front of us seate The server is deployed in window Can't execute on shell file , Local... Can be used here git Environment to operate . Open in the script folder Git Bash, Just execute the script , The following screenshot specifies Nacos Service address port , If you do not specify, the default is to use local Naocs Service default port .
User defined parameter description :
-h:host, The default value is localhost
-p:port, The default value is 8848
-g: Default group , The default value is "SEATA_GROUP"
-t: Tenant information , Corresponding Nacos The namespace of ID Field , The default value is null 
Here we use Nacos take seata Deploy as a highly available mode , You can start seata service , stay bin Execute file under file seata-server.bat, You can also start it in a custom way , The custom parameters are as follows :
| Parameters | jurisdiction | effect | remarks |
|---|---|---|---|
| -h | –host | Specify the registration in the registry IP | Get the current when not specified IP, External access deployed in cloud environments and containers server, It is recommended that |
| -p | –post | Appoint server Start port | The default is 8091 |
| -m | –storeMode | Transaction log storage mode | Support file,db,redis, Default file |
| -n | –serverNode | Is used to specify the seata-server node ID | Such as 1,2,3…, The default is 1 |
| -e | –seataEnv | Appoint seata-server Running environment | Such as dev,prod etc. , The service will start with registry-dev.conf This configuration |
Enable screenshots by default :
seata After the service starts successfully , Will be registered to Nacos in , We need to use seata To handle distributed transactions , Just call Nacos Registered in Seata The service can be , The corresponding configuration information needs to be maintained only in Nacos Modify the corresponding configuration in .
边栏推荐
- uniapp 原生js实现公历转农历
- uniapp uview 框架的form表单,输入校验手机号、校验微信号
- [QNX hypervisor 2.2 user manual] 3.2.1 VM configuration syntax
- Win7系统下无法正常安装JLINK CDC UART驱动的问题解决
- After the qtmqtt source code compilation is set to keepalive, the Ping package timeout error does not return a problem repair (qmqtt:: mqttnopingresponse, qmqtt:: clientprivate:: onpingtimeo)
- Wireshark学习笔记(一)常用功能案例和技巧
- Adobe Premiere基础-时间重映射(十)
- Qtablewidget / qtableview practical tips
- mysql备份和shell脚本手动执行没问题,crontab定时执行失败
- Array type of DB2 SQL pl
猜你喜欢

uniapp 原生js实现公历转农历

Adobe Premiere基础-素材嵌套(制作抖音结尾头像动画)(九)

The value of Business Intelligence BI. Is visual report equal to Business Intelligence BI?

Salesmartly | add a new channel slack to help you close the customer relationship

滑动窗口最值问题

3. Golang并发入门

元数据管理,数字化时代企业的基础建设

NaturalSpeech模型合成语音在CMOS测试中首次达到真人语音水平

两部门发文明确校外培训机构消防安全条件

基础提升---树形DP补充
随机推荐
【QNX Hypervisor 2.2 用户手册】3.2.3 ACPI表和FDT
Cross domain error: when allowcredentials is true, allowedorigins cannot contain the special value "*“
连续六年稳居中国SDN(软件)市场份额第一
阅读micropyton源码-添加C扩展类模块(2)
vcsa7u3c安装教程
The question of enterprise managers, where have we spent our money after so many years of informatization?
【接口教程】EasyCVR如何通过接口设置平台级联?
Adobe Premiere基础(动画制作-弹性动画)(八)
[QNX hypervisor 2.2 user manual] 3.2.1 VM configuration syntax
Adobe Premiere基础(轨道相关)(五)
MySQL index invalidation scenario
商业智能BI如何帮企业降低人力、时间和管理成本?
Db2 SQL PL的数组类型
阅读micropyton源码-添加C扩展类模块(1)
5. Golang泛型与反射
改变世界的开发者丨玩转“俄罗斯方块”的瑶光少年
Request header field xxxx is not allowed by Access-Control-Allow-Headers in preflight response问题
flutter系列之:UI layout简介
In the digital age, why should enterprises make digital transformation?
【QNX Hypervisor 2.2 用户手册】3.2.2 VM配置示例