一、安装node.js
python
# cd /usr/local
# wget https://registry.npmmirror.com/-/binary/node/v16.18.1/node-v16.18.1-linux-x64.tar.gz
# tar -zxvf node-v16.18.1-linux-x64.tar.gz -C ./node-v16.18.1
# cd cd node-v16.18.1
# cd node-v16.18.1-linux-x64/
# mv * ../
二、配置环境变量
python
# sudo vi /etc/profile
# 添加以下内容并保存
export NODE_HOME=/usr/local/node-v16.18.1
export PATH=$PATH:$NODE_HOME/bin
验证配置
python
# source /etc/profile
# node -v
v16.18.1
# npm -v
8.19.2
三、设置仓库地址
python
# npm config set registry "https://registry.npmmirror.com"
# npm config get registry
https://registry.npmmirror.com/
四、安装pm2
python
# npm install pm2 -g
# pm2 --version
五、安装RustDesk Server
python
# cd /usr/local
# wget https://github.com/rustdesk/rustdesk-server/releases/download/1.1.10-3/rustdesk-server-linux-amd64.zip
# unzip rustdesk-server-linux-amd64.zip
# cd amd64
六、运行并设置开机自启
python
# pm2 start hbbs -- -k _
# pm2 start hbbr -- -k _
# pm2 save
# pm2 startup
查看运行状态
python
# pm2 list
七、设置防火墙
python
firewall-cmd --add-port=21115/tcp --permanent
firewall-cmd --add-port=21116/tcp --permanent
firewall-cmd --add-port=21117/tcp --permanent
firewall-cmd --add-port=21118/tcp --permanent
firewall-cmd --add-port=21119/tcp --permanent
firewall-cmd --add-port=21116/udp --permanent
firewall-cmd --reload
八、查看RustDesk key
python
# cd /usr/local/amd64/
# cat ./id_ed25519.pub
九、下载客户端并配置