linux8重启服务代码,linux(centos8):安装分布式事务服务seata(seata 1.3.0/centos 8.2)
一,什么是seata?
Seata:Simpe Extensible Autonomous Transcaction Architecture,
是阿里中間件,開源的分布式事務(wù)解決方案。
前身是阿里的Fescar
官方站:
http://seata.io/zh-cn/
官方代碼地址:
https://github.com/seata/seata
官方文檔站:
http://seata.io/zh-cn/docs/overview/what-is-seata.html
各版本的release下載地址:
https://github.com/seata/seata/releases
說明:作者:劉宏締 郵箱: 371125307@qq.com
二,安裝seata前準(zhǔn)備java環(huán)境:
因?yàn)閟eata是基于java開發(fā)的,所以需要先在機(jī)器上準(zhǔn)備java環(huán)境
1,下載java
從官方站下載:
https://www.oracle.com/cn/java/technologies/javase-downloads.html
下載完成后查看當(dāng)前目錄:
[root@localhost java]# pwd
/usr/local/source/java
[root@localhost java]#lsjdk-14.0.2_linux-x64_bin.tar.gz
2,解壓和安裝:
解壓:
[root@localhost java]# tar -zxvf jdk-14.0.2_linux-x64_bin.tar.gz
把解壓后的jdk目錄,移動(dòng)到安裝目錄/usr/local/soft目錄下:
[root@localhost java]# mv jdk-14.0.2 /usr/local/soft/
3,配置java
編輯profile文件:
[root@localhost java]# vi /etc/profile
內(nèi)容:
export JAVA_HOME=/usr/local/soft/jdk-14.0.2export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib
export PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
使變量生效:
[root@localhost java]# source /etc/profile
4,測(cè)試java的安裝效果
[root@localhost liuhongdi]# java --version
java14.0.2 2020-07-14Java(TM) SE Runtime Environment (build14.0.2+12-46)
Java HotSpot(TM)64-Bit Server VM (build 14.0.2+12-46, mixed mode, sharing)
三,下載seata:
1,用wget命令下載
創(chuàng)建一個(gè)源文件存放目錄:/usr/local/source/seata,
在這個(gè)目錄下下載和解壓
[root@localhost seata]# wget https://github.com/seata/seata/releases/download/v1.3.0/seata-server-1.3.0.tar.gz
2,解壓后并移動(dòng)到安裝目錄:
[root@localhost seata]# lsseata-server-1.3.0.tar.gz
[root@localhost seata]#tar -zxvf seata-server-1.3.0.tar.gz
[root@localhost seata]#mv seata /usr/local/soft/[root@localhost seata]# cd/usr/local/soft/seata/
四,配置seata
1,生成日志目錄:
[root@localhost seata]# mkdir /data/seata
[root@localhost seata]#mkdir /data/seata/logs
[root@localhost seata]#chmod 777 /data/seata/logs
2,進(jìn)入安裝目錄下
[root@localhost seata]# cd conf/[root@localhost conf]#vi logback.xml
修改內(nèi)容:
修改LOG_HOME為我們創(chuàng)建的目錄
七,查看seata-server可用的參數(shù)
用--help
[root@localhost ~]# /usr/local/soft/seata/bin/seata-server.sh --help
可以看到參數(shù):
...
Usage:sh seata-server.sh(for linux and mac) or cmd seata-server.bat(forwindows) [options]
Options:--host, -h
The ip to register to registry center.--port, -p
The port to listen.
Default:8091
--storeMode, -m
log store mode :file, db--serverNode, -n
server nodeid, such as 1, 2, 3.it will be generated according to the
snowflake by default--seataEnv, -e
The name usedfor multi-configuration isolation.--help
八,查看linux的版本 :
[root@localhost java]$ cat /etc/redhat-release
CentOS Linux release8.2.2004 (Core)
總結(jié)
以上是生活随笔為你收集整理的linux8重启服务代码,linux(centos8):安装分布式事务服务seata(seata 1.3.0/centos 8.2)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 软件测试简历没有项目经验怎么写?
- 下一篇: 如何下载矢量建筑轮廓