Files
ThingsGateway/handbook/docs/linuxrelease.mdx
T
2023-07-16 17:28:26 +08:00

56 lines
889 B
Plaintext

---
id: linuxrelease
title: 发布
---
:::tip `须知`
验证码使用SkiaSharp,如果是在 linux 服务下运行则需要安装 libfontconfig1,如 ubuntu 的安装命令
```
apt-get update
apt-get -y install libfontconfig1
```
如果是采用 docker 模式运行,则需要在 dockerfile 中添加如下配置,该命令适用于 debian 和 ubuntu 的 docker
```
RUN apt-get update && apt-get -y install libfontconfig1
```
:::
### (一)PM2守护
详细安装请自行查找资料
查阅详细官方文档 https://pm2.keymetrics.io/docs/usage/quick-start/
下面介绍一下常用指令
- 安装pm2
```
npm install pm2@latest -g
```
- 启用应用程序
```
pm2 start pm2-linux.json
```
- 停止应用程序
```
pm2 stop pm2-linux.json
```
- 自动启动
```
pm2-startup
pm2 save
```
### (二)linux服务
自行查询相关资料 **NetCore/Linux/Systemd**