From 2e87654c98d10f67b6c7d21046159d3d5b1b29d1 Mon Sep 17 00:00:00 2001 From: zhang1106 <849185023@qq.com> Date: Wed, 11 Mar 2026 14:47:55 +0800 Subject: [PATCH] =?UTF-8?q?docs(DEPLOYMENT):=20=E6=9B=B4=E6=96=B0Linux?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E4=B8=8B=E7=9A=84Node.js=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DEPLOYMENT.md | 49 +++++++++++++++---------------------------------- 1 file changed, 15 insertions(+), 34 deletions(-) diff --git a/DEPLOYMENT.md b/DEPLOYMENT.md index a66d24c..e5434d6 100644 --- a/DEPLOYMENT.md +++ b/DEPLOYMENT.md @@ -33,6 +33,21 @@ git clone https://gitee.com/zhang96110/idc_assest.git git clone https://github.com/gituib/idc_assest.git cd idc_assest +#如果没安装nodejs需要先安装 + +**Ubuntu/Debian:** +```bash +curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - +sudo apt-get install -y nodejs +``` + +**CentOS/RHEL/Fedora:** +```bash +curl -fsSL https://rpm.nodesource.com/setup_20.x | sudo bash - +sudo yum install -y nodejs + +系统已经安装了nodejs的可以直接执行一键安装脚本 + # 运行部署脚本 npm run deploy # 或 @@ -109,40 +124,6 @@ node install.js ### 1. 环境准备 -#### Windows - -**方式一:官方安装包(推荐)** -1. 访问: https://nodejs.org/ -2. 下载 LTS 版本(推荐 v20.x) -3. 运行安装包,按向导完成安装 - -**方式二:nvm-windows(推荐开发者)** -1. 下载安装 nvm-windows: https://github.com/coreybutler/nvm-windows/releases -2. 执行: `nvm install 20` -3. 执行: `nvm use 20` - -**方式三:Winget(Windows 10/11)** -```powershell -winget install OpenJS.NodeJS.LTS -``` - -#### macOS - -**方式一:Homebrew(推荐)** -```bash -brew install node@20 -``` - -**方式二:nvm(推荐开发者)** -```bash -# 安装 nvm -curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash - -# 安装 Node.js 20 -nvm install 20 -nvm use 20 -``` - #### Linux **Ubuntu/Debian:**