========================================== AI Chatbot 服务器迁移脚本 ========================================== 新服务器: root@45.192.99.48:22 域名: ai.yydd.ai 应用端口: 3125 从Git仓库拉取源码和备份数据库 时间: Sun Dec 28 18:18:16 CST 2025 ========================================== ✅ 找到数据库备份文件: /Users/lanmu/Desktop/ai-chatbot-main/migration-backup-complete/database_complete.dump (144M) ✅ Git仓库: http://git.1080p.hk/chenpei/ai-chatbot.git 🔍 测试新服务器连接... ✅ 新服务器连接正常 📦 步骤 1/8: 在新服务器上安装必要软件... Pseudo-terminal will not be allocated because stdin is not a terminal. Last failed login: Sun Dec 28 18:18:18 CST 2025 from 14.103.112.116 on ssh:notty There were 167 failed login attempts since the last successful login. 检测系统类型... 检测到CentOS/RHEL系统,使用dnf包管理器 跳过系统更新,直接安装所需软件... 安装基础工具... Dependencies resolved. Nothing to do. Complete! 安装PostgreSQL... 安装Node.js 20.x... 使用NodeSource安装Node.js 20... 2025-12-28 18:18:20 - Cleaning up old repositories... 2025-12-28 18:18:20 - Old repositories removed 2025-12-28 18:18:20 - Supported architecture: x86_64 2025-12-28 18:18:20 - Added N|Solid repository for LTS version: 20.x 2025-12-28 18:18:20 - dnf available, updating... Node.js Packages for Linux RPM based distros - 57 kB/s | 3.0 kB 00:00 Metadata cache created. N|Solid Packages for Linux RPM based distros - 58 kB/s | 3.0 kB 00:00 Metadata cache created. 2025-12-28 18:18:22 - Repository is configured and updated. 2025-12-28 18:18:22 - You can use N|solid Runtime as a node.js alternative 2025-12-28 18:18:22 - To install N|solid Runtime, run: dnf install nsolid -y 2025-12-28 18:18:22 - Run 'dnf install nodejs -y' to complete the installation. Dependencies resolved. Nothing to do. Complete! Node.js安装完成 安装PM2和pnpm... 安装Nginx... 安装Certbot (Let's Encrypt)... No match for argument: certbot No match for argument: python3-certbot-nginx Error: Unable to find a match: certbot python3-certbot-nginx ✅ 所有软件安装完成 📥 步骤 2/8: 从Git仓库克隆项目... Pseudo-terminal will not be allocated because stdin is not a terminal. Last failed login: Sun Dec 28 18:18:23 CST 2025 from 92.191.96.115 on ssh:notty There were 169 failed login attempts since the last successful login. 删除现有目录... 正在从Git仓库克隆... Cloning into '/var/www/ai-chatbot'... ✅ 项目代码已从Git仓库克隆 📤 步骤 3/8: 上传数据库备份...