2022-04-11 11:05:11 +02:00
|
|
|
|
---
|
2022-04-22 11:47:47 +02:00
|
|
|
|
title: Windows & pm2
|
2022-04-11 11:05:11 +02:00
|
|
|
|
weight: 20
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
### 安装NodeJs
|
|
|
|
|
请点击[下载](https://nodejs.org/dist/v16.14.2/node-v16.14.2-x86.msi)安装,可能会有点慢,如果卡顿太久,尝试关掉重新安装。
|
|
|
|
|
NodeJs是pm2的运行时环境,所以要先安装NodeJs。
|
|
|
|
|
|
|
|
|
|
### 安装pm2
|
|
|
|
|
在cmd.exe中分别输入下面三行,每一行都要按回车键,一行一行运行。
|
|
|
|
|
```
|
|
|
|
|
npm install -g pm2
|
|
|
|
|
npm install pm2-windows-startup -g
|
|
|
|
|
pm2-startup install
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### 运行hbbr和hbbs
|
2022-11-08 16:59:58 +01:00
|
|
|
|
下载Windows版本[服务器程序](https://github.com/rustdesk/rustdesk-server/releases),假设你解压缩到了C盘下。分别运行下面四行命令。
|
2022-04-11 11:05:11 +02:00
|
|
|
|
```
|
|
|
|
|
cd c:\rustdesk-server-windows-x64
|
2022-05-12 15:06:38 +02:00
|
|
|
|
pm2 start hbbs.exe -- -r hbbr运行所在主机的地址
|
|
|
|
|
pm2 start hbbr.exe
|
2022-04-11 11:05:11 +02:00
|
|
|
|
pm2 save
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### 查看log
|
|
|
|
|
```
|
|
|
|
|
pm2 log hbbr
|
|
|
|
|
pm2 log hbbs
|
2022-11-08 16:59:58 +01:00
|
|
|
|
```
|