From 5f7756227de3fee13da67308877d829309b948f1 Mon Sep 17 00:00:00 2001 From: 3344 Date: Thu, 22 Jan 2026 16:22:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20ru2=E8=BF=9B=E5=88=B6?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E5=AE=89=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ru2进制下载安装 | 96 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 ru2进制下载安装 diff --git a/ru2进制下载安装 b/ru2进制下载安装 new file mode 100644 index 0000000..4c5e1c5 --- /dev/null +++ b/ru2进制下载安装 @@ -0,0 +1,96 @@ +bash <(curl -sSL https://raw.githubusercontent.com/tech-shrimp/rustdesk-native-install/main/install.sh 2>/dev/null || echo " +#!/bin/bash +# 颜色定义 +GREEN='\033[32m' +RED='\033[31m' +YELLOW='\033[33m' +PLAIN='\033[0m' + +# 安装目录 +INSTALL_DIR='/opt/rustdesk' +WORK_DIR='/vol1/1000/dock/rustdesk_native' # 既然没有Docker,我们用这个目录存数据以符合你的习惯 + +echo -e \"\${GREEN}>>> 开始安装 RustDesk Server (原生版) <<<\${PLAIN}\" + +# 1. 准备环境 +if [[ \$EUID -ne 0 ]]; then + echo -e \"\${RED}请使用 root 运行!\${PLAIN}\" + exit 1 +fi +apt-get update && apt-get install -y wget unzip tar + +# 2. 获取 IP +read -p \"请输入服务器公网 IP (必填): \" HOST_IP +if [[ -z \"\$HOST_IP\" ]]; then echo -e \"\${RED}IP 不能为空\${PLAIN}\"; exit 1; fi + +# 3. 下载程序 (使用 GitHub 最新稳定版) +mkdir -p \$INSTALL_DIR +mkdir -p \$WORK_DIR +cd \$INSTALL_DIR +echo -e \"\${YELLOW}正在下载 RustDesk 服务端程序...\${PLAIN}\" +# 这里使用固定的稳定版链接,防止获取失败 +wget -O rustdesk-server.zip https://github.com/rustdesk/rustdesk-server/releases/download/1.1.11-1/rustdesk-server-linux-amd64.zip +unzip -o rustdesk-server.zip +chmod +x hbbs hbbr + +# 4. 创建系统服务 (hbbs - ID服务器) +cat > /etc/systemd/system/rustdesk-hbbs.service < /etc/systemd/system/rustdesk-hbbr.service <