Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄嘉阳
/
iot-platform-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
f04d606b
authored
Jan 23, 2024
by
罗志长
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
doc
parent
d5b480ec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
29 deletions
doc/deploy.md
doc/deploy.md
View file @
f04d606b
# 平台端
## 服务器环境准备
-
JDK(版本号1.8.0_202)
-
Redis
-
MySql 初始化脚本db/init/init.sql
-
JDK 1.8.0_2xx (需要小版本号大于200)
-
Redis 5.x
-
MySql 5.7+ (初始化脚本db/init/init.sql)
-
ElasticSearch 6.8.11
-
Kibana 6.8.11 (可选)
## 项目打包
-
拉取源码http://git.xmmakeit.com/huangjiay/iot-platform-server.git
-
切换分支(master生产环境,dev测试环境)
-
在项目根目录下执行mvn clean package进行打包
## 部署
-
在服务器上创建目录/opt/iot-platform-server
-
将jar包上传至服务器/opt/iot-platform-server目录下
-
正式环境在/opt/iot-platform-server/config目录下新建application.yaml文件,请注意修改对应配置信息!!!
-
application.yaml
```yaml
server:
port: 10005
...
...
@@ -22,18 +29,18 @@
charset: UTF-8
force: true
enabled: true
spring:
application:
name: iot-server
datasource:
url: jdbc:mysql://127.0.0.1:3306/kanyang_app?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=GMT%2B8&autoReconnect=true
username: kuangshi
password: ks@kjb#Ds@1010&
driver-class-name: com.mysql.cj.jdbc.Driver
#type: com.alibaba.druid.pool.DruidDataSource
redis:
address: redis://localhost:6379
password: iot@2023
...
...
@@ -58,39 +65,39 @@
starttls:
enable: true
required: true
sign:
flag: false
mybatis-plus:
configuration:
log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
file:
filePath: file
file: /opt/iot-platform-server/file/${file.filePath}
log: logs
storage:
location: ${file.file}
type: local
url: https://saas.quanthium.com.cn/api/${file.filePath}
logging:
level:
root: info
config: classpath:logback-spring-prod.xml
swagger:
prefix:
maven:
profile:
redis:
prefix:
libreOffice: /home/group1_lzy/iot-server/LibreOffice/program/soffice
iot:
url: https://iot.quanthium.com.cn/api/
uploadUrl: https://saas.qa.quanthium.com.cn/api/saas/device/devicePushLog
...
...
@@ -98,7 +105,7 @@
secureKey: SK48ztMZDMEs8FmaPHjGQGmQBA4CjrPt
sync:
enable: true
mqtt:
username: kuangshi-tumble|1704772011077
password: 9918b498632f64d7de9537c663a50427
...
...
@@ -108,17 +115,17 @@
timeout: 10
keepalive: 60
msgSwitch: true
wx:
miniapp:
config:
appid: wx454f0dbc28a6529a #微信小程序的appid
secret: fb20da3064d6b7ac90d5c15cf407df46 #微信小程序的Secret
token: #微信小程序消息服务器配置的token
aesKey: #微信小程序消息服务器配置的EncodingAESKey
msgDataFormat: JSON
sms:
send:
url: http://www.aozoneyun.com/message/message/send
...
...
@@ -129,7 +136,7 @@
url: http://www.aozoneyun.com/Message/Message/video_send
uid: 362
pwd: xmksyy123456
shengwang:
appId: 883078934ecd4193aa7a62a3cdacd810
appCertificate: b29be69c9c034120a68f1d5c199d2e74
...
...
@@ -140,7 +147,7 @@
customerKey: b3b5f44e536a4fc191358926c6716b7b
customerSecret: bd81828a133140a58dfb04e9d80eba43
pid: C567D6F40C6E48E293AA4F9B7AE9BA30
aliyun:
oss:
accessKey: LTAI5tMjaFCiaYYLmtCLiuMj
...
...
@@ -148,22 +155,25 @@
endpoint: oss-cn-shenzhen.aliyuncs.com
bucket: kangyang-oss
baseDir: kangyang
elasticsearch:
host: 47.106.229.44
port: 9200
user:
password:
scheme: http
```
-
启动项目
-
测试环境
```sh
nohup java -jar server-web.jar --spring.profiles.active=test &
```
```sh
nohup java -jar server-web.jar --spring.profiles.active=test &
```
-
正式环境
```sh
nohup java -jar server-web.jar &
```
```sh
nohup java -jar server-web.jar &
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment