首页 > 其他分享 >微服务项目部署-POS收银系统

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

时间:2022-10-05 13:01:22浏览次数:54  
标签:教程 JAVA License 服务项目 POS 收银 Linux under 安装


环境准备:

linux系统2台,或者1台足够大的内存,因为安装工具和启动服务需要占用很大内存,大约8G

一、工具安装

1.jdk安装

安装教程参考:Linux上安装jdk并配置环境变量

2.mysql安装

安装教程参考:Linux上安装mysql

3.redis安装

安装教程参考:Linux安装redis

4.nacos安装

安装教程参考:Linux上安装Nacos

5.RockerMQ安装

安装教程参考:Linux上安装rocketmq

6.Nginx安装

安装教程参考:Linux安装nginx

7.Minio安装(根据实际情况安装)

安装教程参考:Linux上安装minio

8.Sentinel限流、降级组件安装

安装教程参考:Linux上安装Sentinel限流、降级组件

二、应用系统安装与配置

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.jar

if [ -n "${JAVA_HOME}" ] && [ -x "${JAVA_HOME}/bin/java" ]; then
export JAVA_CMD="${JAVA_HOME}/bin/java"
fi

if [ -z "${JAVA_CMD}" ]; then
export JAVA_CMD="/usr/local/java/jdk1.8.0_291/bin/java"
fi

if [ -z "${JAVA_CMD}" -o ! -x "${JAVA_CMD}" ] ; then
echo "Could not find 'java' executable in JAVA_HOME or PATH."
exit 1
fi

JAVA_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" ] ; then
echo "No GatewayServerApplication running."
exit -1;
fi

echo "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指定目录下

标签:教程,JAVA,License,服务项目,POS,收银,Linux,under,安装
From: https://blog.51cto.com/u_11710338/5732524

相关文章

  • Sublime Text - Linux Package Manager Repositories
    LinuxPackageManagerRepositorieshttp://www.sublimetext.com/docs/linux_repositories.htmlSublimeTextincludesanauto-upgrademechanismonWindowsandMac......
  • postman7种断言的使用
    导航:1.postman断言介绍2.状态码断言3.响应正文断言-包含4.响应正文断言-json字段5.响应头断言6.响应时间断言7.环境变量的断言---------分割线--------......
  • [Oracle] LeetCode 41 First Missing Positive 思维
    Givenanunsortedintegerarraynums,returnthesmallestmissingpositiveinteger.Youmustimplementanalgorithmthatrunsin\(O(n)\)timeandusesconstan......
  • L10U3-3-Writing-a-budget-proposal
    1ExpressionsOptionsconsidermoredrastic(激烈的)options考虑更激烈的选择onealternativetoconsiderListingoptionsOnewaytodealwithaproblemistol......
  • 使用 HammerDB 对 Citus 和 Postgres 进行 Benchmark,每分钟200万新订单处理测试(官方
    在为Postgres运行性能基准测试时,主要建议是:“自动化!”如果您正在测量数据库性能,您可能不得不一遍又一遍地运行相同的基准测试。要么是因为你想要一个稍微不同的配置,要......
  • 3.postman
    一文带你全面解析postman工具的使用(基础篇)postman是一款支持http协议的接口调试与测试工具,其主要特点就是功能强大,使用简单且易用性好。无论是开发人员进行接口调试,还是......
  • Postman 打开postman console控制台,查看接口测试打印log
    经常在脚本中使用变量时,你可能需要看到变量获取到的值,你可以使用PostmanConsole去实现的。操作步骤:应用菜单-->​​View​​--->Show PostmanConsole​​,去打印变量的值......
  • vue面试之Composition-API响应式包装对象原理
    本文主要分以下两个部分对CompositionAPI的原理进行解读:reactiveAPI原理refAPI原理reactiveAPI原理打开源码可以找到reactive的入口,在composition-api/src/r......
  • L10U2-3-Responding-to-proposed-changes
    1VocabularyWhat'sintheoffice?storagespacerecreationroom娱乐室daycarecenter日托中心bicycleparkingyogaroommeetingspacestaffshowers2Express......
  • vscode插件REST Client,替代postman
    如果只是简单的请求工作的话,这个插件也许跟方便使用方式准备工作安装该插件创建一个test.http(名字随意,后缀.http)文件朴素的请求后面必须有协议版本号HTTP/1.1......