Files
ThingsGateway/handbook/docs/09、部署说明/9.2、Windows部署.mdx
Iot边缘设备 85829e70c1 !5 添加部署文档
* 添加部署文档
2023-03-27 10:22:30 +00:00

68 lines
1.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
id: windowspublish
title: Windows部署
sidebar_label: 9.2、Windows部署
---
### PM2守护
详细安装请自行查找资料
查阅详细官方文档 https://pm2.keymetrics.io/docs/usage/quick-start/
下面介绍一下常用指令
- 安装pm2
```
npm install pm2@latest -g
```
- 启用应用程序
```
pm2 start pm2-windows.json
```
- 停止应用程序
```
pm2 stop pm2-windows.json
```
- 开机自动启动
```
npm install pm2-windows-startup -g //服务安装
pm2-startup install
pm2 save //每次操作pm2应用列表时需执行
```
### windows服务
安装对应服务
<img src={require('../../static/img/windowspublish1.png').default} width="800" />
<img src={require('../../static/img/windowspublish2.png').default} width="800" />
**重新编译发布**
遵循windows service服务安装/启动/停止方式 https://docs.microsoft.com/zh-cn/windows-server/administration/windows-commands/sc-create
- 安装
```
sc create <Name> binPath= <Path> start= auto
net start <Name>
```
- 卸载
```
net stop <Name>
sc delete <Name>
```
### IIS
自行查询相关资料 **AspNetCore/IIS**