在 CentOS 上配置 Node.js 所需时间,取决于方式、网络、是否生产环境,一般如下:
curl -fsSL https://rpm.nodesource.com/setup_20.x | bash -
yum install -y nodejs
node -v
✅ 耗时:3–10 分钟(网络正常)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
nvm install 20
✅ 耗时:5–15 分钟
如果你愿意,可以告诉我:
我可以直接给你最省时的具体步骤。