Centos安装nodejs,npm (压缩包)
下载node阿里云镜像(推荐)
地址:https://npm.taobao.org/mirrors/node/latest-v14.x/
选择自己要下载的版本,这里我选择的v14.6.0
cd /usr/local/src
wget https://npm.taobao.org/mirrors/node/latest-v14.x/node-v14.0.0-linux-x64.tar.gz
tar -zxv -f node-v14.0.0-linux-x64.tar.gz -C /usr/local/
vim /etc/profile.d/nodejs.sh
export NODE_HOME=/usr/local/node-v14.0.0-linux-x64
export PATH=$PATH:${NODE_HOME}/bin
source /etc/profile.d/nodejs.sh
node -v
npm -v
npm config set registry "https://registry.npm.taobao.org"
npm config get registry