RustDesk自建服务器在Windows Server 2019 上安装 保姆级教程
一、系统环境
windows server 2019 Standard
带桌面管理版
二、安装node.js
2.1、node.js
基本信息
软件:node-v16.14.2-x86
node.js
官网:Node.js (nodejs.org)
下载
v16+
LTS
版本
2.2、node.js
安装
- 这里一定不要勾选,巨坑,安装一堆东西,还不成功。node.js安装完成后,手动安装VC++。
- VC++ 下载地址:Visual C++
2.3、安装完成检查
Microsoft Windows [版本 10.0.17763.1339]
(c) 2018 Microsoft Corporation。保留所有权利。C:\Users\Administrator>node -v
v16.14.2C:\Users\Administrator>
三、安装pm2
打开CMD
依次输入以下三行命令
npm install -g pm2
npm install pm2-windows-startup -g
pm2-startup install
安装过程记录
C:\Users\Administrator>npm install -g pm2
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.added 182 packages, and audited 183 packages in 57s12 packages are looking for fundingrun `npm fund` for detailsfound 0 vulnerabilities
npm notice
npm notice New minor version of npm available! 8.5.0 -> 8.13.2
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.13.2
npm notice Run npm install -g npm@8.13.2 to update!
npm noticeC:\Users\Administrator>npm install pm2-windows-startup -gadded 19 packages, and audited 20 packages in 8sfound 0 vulnerabilitiesC:\Users\Administrator>pm2-startup install
Successfully added PM2 startup registry entry.
四、安装VC++
下载地址:https://docs.microsoft.com/zh-CN/cpp/windows/latest-supported-vc-redist?view=msvc-170
傻瓜式安装
五、运行hbbr
和hbbs
5.1、解压rustdesk-server-windows-x64.zip
到C盘
5.2、运行hbbr
和hbbs
依次运行以下命令
cd c:\rustdesk-server-windows-x64
pm2 start hbbs.exe -- -r hbbr运行所在主机的地址,在公司局域网内用内网地址,再做端口映射就是,若是买了云服务器,写云厂商提供的公网IP,并且开放对应的端口。
pm2 start hbbr.exe
pm2 save
cd c:\rustdesk-server-windows-x64 表示进入
rustdesk-server-windows-x64.zip
解压后目录
安装过程记录
C:\Users\Administrator>cd C:\rustdesk-server-windows-x64C:\rustdesk-server-windows-x64>pm2 start hbbs.exe -- -r 192.168.0.176-------------__/\\\\\\\\\\\\\____/\\\\____________/\\\\____/\\\\\\\\\______\/\\\/\\\_\/\\\\\\________/\\\\\\__/\\\///\\\____\/\\\_______\/\\\_\/\\\//\\\____/\\\//\\\_\///______\//\\\___\/\\\\\\\\\\\\\/__\/\\\\///\\\/\\\/_\/\\\___________/\\\/____\/\\\/____\/\\\__\///\\\/___\/\\\________/\\\//______\/\\\_____________\/\\\____\///_____\/\\\_____/\\\//_________\/\\\_____________\/\\\_____________\/\\\___/\\\/____________\/\\\_____________\/\\\_____________\/\\\__/\\\\\\\\\\\\\\\__\///______________\///______________\///__\///__Runtime EditionPM2 is a Production Process Manager for Node.js applicationswith a built-in Load Balancer.Start and Daemonize any application:$ pm2 start app.jsLoad Balance 4 instances of api.js:$ pm2 start api.js -i 4Monitor in production:$ pm2 monitorMake pm2 auto-boot at server restart:$ pm2 startupTo go further checkout:http://pm2.io/-------------[PM2] Spawning PM2 daemon with pm2_home=C:\Users\Administrator\.pm2
[PM2] PM2 Successfully daemonized
[PM2] Starting C:\rustdesk-server-windows-x64\hbbs.exe in fork_mode (1 instance)
[PM2] Done.
┌─────┬─────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
├─────┼─────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0 │ hbbs │ default │ N/A │ fork │ 1976 │ 0s │ 0 │ online │ 0% │ 9.6mb │ Adm… │ disabled │
└─────┴─────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘C:\rustdesk-server-windows-x64>pm2 start hbbr.exe
[PM2] Starting C:\rustdesk-server-windows-x64\hbbr.exe in fork_mode (1 instance)