日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > windows >内容正文

windows

微服务项目部署-POS收银系统

發布時間:2023/12/18 windows 28 豆豆
生活随笔 收集整理的這篇文章主要介紹了 微服务项目部署-POS收银系统 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

環境準備:

linux系統2臺,或者1臺足夠大的內存,因為安裝工具和啟動服務需要占用很大內存,大約8G

一、工具安裝

1.jdk安裝

安裝教程參考:Linux上安裝jdk并配置環境變量_QQ:3083155908的博客-CSDN博客

2.mysql安裝

安裝教程參考:Linux上安裝mysql_QQ:3083155908的博客-CSDN博客

3.redis安裝

安裝教程參考:Linux安裝redis_QQ:3083155908的博客-CSDN博客

4.nacos安裝

安裝教程參考:Linux上安裝Nacos_QQ:3083155908的博客-CSDN博客_linux nacos安裝包

5.RockerMQ安裝

安裝教程參考:Linux上安裝rocketmq_QQ:3083155908的博客-CSDN博客

6.Nginx安裝

安裝教程參考:Linux安裝nginx_QQ:3083155908的博客-CSDN博客

7.Minio安裝(根據實際情況安裝)

安裝教程參考:Linux上安裝minio_QQ:3083155908的博客-CSDN博客

8.Sentinel限流、降級組件安裝

安裝教程參考:Linux上安裝Sentinel限流、降級組件_QQ:3083155908的博客-CSDN博客

二、應用系統安裝與配置

1.網關微服務部署

打包使用IDEA->maven->Lifecycle->package

打包后的路徑是:根目錄的target目錄

1)將打包好的jar文件octv-pos-gateway-1.0.0.jar上傳到 /opt/octv/product/pos/octv-pos-gateway下

2)新建startup.sh

#!/bin/bash # # Copyright 2009-2022 OCT Vision Group Holding Ltd. # 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.BASE_DIR=`cd $(dirname $0); pwd -P` JAR_FILE=${BASE_DIR}/octv-pos-gateway-1.0.0.jarif [ -n "${JAVA_HOME}" ] && [ -x "${JAVA_HOME}/bin/java" ]; thenexport JAVA_CMD="${JAVA_HOME}/bin/java" fiif [ -z "${JAVA_CMD}" ]; thenexport JAVA_CMD="/usr/local/java/jdk1.8.0_291/bin/java" fiif [ -z "${JAVA_CMD}" -o ! -x "${JAVA_CMD}" ] ; thenecho "Could not find 'java' executable in JAVA_HOME or PATH."exit 1 fiJAVA_OPTS="-Xms512m -Xmx512m -Xmn256m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=256m" JAVA_EXT_OPTS=""echo "The GatewayServerApplication is starting..." nohup ${JAVA_CMD} ${JAVA_OPTS} -jar ${JAR_FILE} ${JAVA_EXT_OPTS} >> ${BASE_DIR}/nohup.log 2>&1 & echo "GatewayServerApplication is started,you can check the log file: ${BASE_DIR}/nohup.log"

3)新建shutdown.sh

#!/bin/bash # # Copyright 2009-2022 OCT Vision Group Holding Ltd. # 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.pid=`ps -ef | grep octv-pos-gateway | grep -v grep | awk '{print $2}'` if [ -z "$pid" ] ; thenecho "No GatewayServerApplication running."exit -1; fiecho "The GatewayServerApplication(${pid}) is running..." kill ${pid} echo "Send shutdown request to GatewayServerApplication(${pid}) OK"

4)啟動

切換到部署目錄,運行命令: sh? ?startpup.sh

ps -ef|grep java

2.認證微服務部署

同上

3.系統微服務部署

4.產品微服務部署

5.訂單微服務部署

6.報表微服務部署

7.前端項目部署

前端打包:

npm run build:stage

# 構建生產環境
npm run build:prod

將打包后的dist里面的文件上傳到 nginx指定目錄下

總結

以上是生活随笔為你收集整理的微服务项目部署-POS收银系统的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。