Commit f04d606b by 罗志长

doc

parent d5b480ec
Showing with 39 additions and 29 deletions
# 平台端 # 平台端
## 服务器环境准备 ## 服务器环境准备
- JDK(版本号1.8.0_202)
- Redis - JDK 1.8.0_2xx (需要小版本号大于200)
- MySql 初始化脚本db/init/init.sql - 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 - 拉取源码http://git.xmmakeit.com/huangjiay/iot-platform-server.git
- 切换分支(master生产环境,dev测试环境) - 切换分支(master生产环境,dev测试环境)
- 在项目根目录下执行mvn clean package进行打包 - 在项目根目录下执行mvn clean package进行打包
## 部署 ## 部署
- 在服务器上创建目录/opt/iot-platform-server - 在服务器上创建目录/opt/iot-platform-server
- 将jar包上传至服务器/opt/iot-platform-server目录下 - 将jar包上传至服务器/opt/iot-platform-server目录下
- 正式环境在/opt/iot-platform-server/config目录下新建application.yaml文件,请注意修改对应配置信息!!! - 正式环境在/opt/iot-platform-server/config目录下新建application.yaml文件,请注意修改对应配置信息!!!
- application.yaml - application.yaml
```yaml ```yaml
server: server:
port: 10005 port: 10005
...@@ -22,18 +29,18 @@ ...@@ -22,18 +29,18 @@
charset: UTF-8 charset: UTF-8
force: true force: true
enabled: true enabled: true
spring: spring:
application: application:
name: iot-server name: iot-server
datasource: 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 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 username: kuangshi
password: ks@kjb#Ds@1010& password: ks@kjb#Ds@1010&
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
#type: com.alibaba.druid.pool.DruidDataSource #type: com.alibaba.druid.pool.DruidDataSource
redis: redis:
address: redis://localhost:6379 address: redis://localhost:6379
password: iot@2023 password: iot@2023
...@@ -58,39 +65,39 @@ ...@@ -58,39 +65,39 @@
starttls: starttls:
enable: true enable: true
required: true required: true
sign: sign:
flag: false flag: false
mybatis-plus: mybatis-plus:
configuration: configuration:
log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
file: file:
filePath: file filePath: file
file: /opt/iot-platform-server/file/${file.filePath} file: /opt/iot-platform-server/file/${file.filePath}
log: logs log: logs
storage: storage:
location: ${file.file} location: ${file.file}
type: local type: local
url: https://saas.quanthium.com.cn/api/${file.filePath} url: https://saas.quanthium.com.cn/api/${file.filePath}
logging: logging:
level: level:
root: info root: info
config: classpath:logback-spring-prod.xml config: classpath:logback-spring-prod.xml
swagger: swagger:
prefix: prefix:
maven: maven:
profile: profile:
redis: redis:
prefix: prefix:
libreOffice: /home/group1_lzy/iot-server/LibreOffice/program/soffice libreOffice: /home/group1_lzy/iot-server/LibreOffice/program/soffice
iot: iot:
url: https://iot.quanthium.com.cn/api/ url: https://iot.quanthium.com.cn/api/
uploadUrl: https://saas.qa.quanthium.com.cn/api/saas/device/devicePushLog uploadUrl: https://saas.qa.quanthium.com.cn/api/saas/device/devicePushLog
...@@ -98,7 +105,7 @@ ...@@ -98,7 +105,7 @@
secureKey: SK48ztMZDMEs8FmaPHjGQGmQBA4CjrPt secureKey: SK48ztMZDMEs8FmaPHjGQGmQBA4CjrPt
sync: sync:
enable: true enable: true
mqtt: mqtt:
username: kuangshi-tumble|1704772011077 username: kuangshi-tumble|1704772011077
password: 9918b498632f64d7de9537c663a50427 password: 9918b498632f64d7de9537c663a50427
...@@ -108,17 +115,17 @@ ...@@ -108,17 +115,17 @@
timeout: 10 timeout: 10
keepalive: 60 keepalive: 60
msgSwitch: true msgSwitch: true
wx: wx:
miniapp: miniapp:
config: config:
appid: wx454f0dbc28a6529a #微信小程序的appid appid: wx454f0dbc28a6529a #微信小程序的appid
secret: fb20da3064d6b7ac90d5c15cf407df46 #微信小程序的Secret secret: fb20da3064d6b7ac90d5c15cf407df46 #微信小程序的Secret
token: #微信小程序消息服务器配置的token token: #微信小程序消息服务器配置的token
aesKey: #微信小程序消息服务器配置的EncodingAESKey aesKey: #微信小程序消息服务器配置的EncodingAESKey
msgDataFormat: JSON msgDataFormat: JSON
sms: sms:
send: send:
url: http://www.aozoneyun.com/message/message/send url: http://www.aozoneyun.com/message/message/send
...@@ -129,7 +136,7 @@ ...@@ -129,7 +136,7 @@
url: http://www.aozoneyun.com/Message/Message/video_send url: http://www.aozoneyun.com/Message/Message/video_send
uid: 362 uid: 362
pwd: xmksyy123456 pwd: xmksyy123456
shengwang: shengwang:
appId: 883078934ecd4193aa7a62a3cdacd810 appId: 883078934ecd4193aa7a62a3cdacd810
appCertificate: b29be69c9c034120a68f1d5c199d2e74 appCertificate: b29be69c9c034120a68f1d5c199d2e74
...@@ -140,7 +147,7 @@ ...@@ -140,7 +147,7 @@
customerKey: b3b5f44e536a4fc191358926c6716b7b customerKey: b3b5f44e536a4fc191358926c6716b7b
customerSecret: bd81828a133140a58dfb04e9d80eba43 customerSecret: bd81828a133140a58dfb04e9d80eba43
pid: C567D6F40C6E48E293AA4F9B7AE9BA30 pid: C567D6F40C6E48E293AA4F9B7AE9BA30
aliyun: aliyun:
oss: oss:
accessKey: LTAI5tMjaFCiaYYLmtCLiuMj accessKey: LTAI5tMjaFCiaYYLmtCLiuMj
...@@ -148,22 +155,25 @@ ...@@ -148,22 +155,25 @@
endpoint: oss-cn-shenzhen.aliyuncs.com endpoint: oss-cn-shenzhen.aliyuncs.com
bucket: kangyang-oss bucket: kangyang-oss
baseDir: kangyang baseDir: kangyang
elasticsearch: elasticsearch:
host: 47.106.229.44 host: 47.106.229.44
port: 9200 port: 9200
user: user:
password: password:
scheme: http 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 &
```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment