diff --git a/INSTALL_GUIDE.md b/INSTALL_GUIDE.md index 750fd49..14880ae 100644 --- a/INSTALL_GUIDE.md +++ b/INSTALL_GUIDE.md @@ -181,6 +181,35 @@ pm2 restart wanwanyun-backend ``` ### 6. 如何卸载? +使用一键卸载命令: +```bash +# 方式1: 在线卸载 +curl -fsSL https://gitee.com/yu-yon/vue-driven-cloud-storage/raw/master/install.sh | bash -s -- --uninstall + +# 方式2: 在线卸载 +wget -qO- https://gitee.com/yu-yon/vue-driven-cloud-storage/raw/master/install.sh | bash -s -- --uninstall + +# 方式3: 本地卸载(如果已下载脚本) +bash install.sh --uninstall +``` + +**卸载特性**: +- 双重确认机制,防止误删 +- 可选数据备份到 `/root/wanwanyun-backup-YYYYMMDD-HHMMSS` +- 完整清理: + - PM2 进程: wanwanyun-backend + - 项目目录: /var/www/wanwanyun + - Nginx 配置: /etc/nginx/sites-enabled/wanwanyun.conf + - SSL 证书: /etc/nginx/ssl/* + - 临时文件和缓存 +- 保留系统环境: + - Node.js + - Nginx + - PM2 + - 编译工具(build-essential、gcc-c++等) +- 智能残留检查 + +**手动卸载**(仅作参考,推荐使用自动卸载): ```bash # 停止服务 pm2 delete wanwanyun-backend