========================================== AI Chatbot 服务器迁移脚本 ========================================== 新服务器: root@45.192.99.48:22 域名: ai.yydd.ai 应用端口: 3125 从Git仓库拉取源码和备份数据库 时间: Sun Dec 28 18:19:15 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:19:18 CST 2025 from 102.88.137.80 on ssh:notty There were 179 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:19:24 - Cleaning up old repositories... 2025-12-28 18:19:24 - Old repositories removed 2025-12-28 18:19:24 - Supported architecture: x86_64 2025-12-28 18:19:24 - Added N|Solid repository for LTS version: 20.x 2025-12-28 18:19:24 - dnf available, updating... Node.js Packages for Linux RPM based distros - 62 kB/s | 3.0 kB 00:00 Metadata cache created. N|Solid Packages for Linux RPM based distros - 62 kB/s | 3.0 kB 00:00 Metadata cache created. 2025-12-28 18:19:25 - Repository is configured and updated. 2025-12-28 18:19:25 - You can use N|solid Runtime as a node.js alternative 2025-12-28 18:19:25 - To install N|solid Runtime, run: dnf install nsolid -y 2025-12-28 18:19:25 - 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:19:18 CST 2025 from 102.88.137.80 on ssh:notty There were 179 failed login attempts since the last successful login. 删除现有目录... 正在从Git仓库克隆... Cloning into '/var/www/ai-chatbot'... ✅ 项目代码已从Git仓库克隆 📤 步骤 3/8: 上传数据库备份... ./migrate-to-new-server.sh: line 198: hpass: command not found