# nodejs的安装

cp node-v12.14.1-linux-x64.tar.xz /opt
cd /opt
tar -xvf node-v12.14.1-linux-x64.tar.xz

ln -s /opt/node-v12.14.1-linux-x64/bin/node /usr/bin/node
ln -s /opt/node-v12.14.1-linux-x64/bin/npm /usr/bin/npm
node -v
npm -v
npm config set registry https://registry.npm.taobao.org
npm config set chromedriver_cdnurl https://npm.taobao.org/mirrors/chromedriver

# 指定版本安装

wget https://nodejs.org/dist/v8.9.0/node-v8.9.0-linux-x64.tar.gz

cp node-v8.9.0-linux-x64.tar.gz /opt
cd /opt
tar -zxvf  node-v8.9.0-linux-x64.tar.gz

ln -s /opt/node-v8.9.0-linux-x64/bin/node /usr/bin/node
ln -s /opt/node-v8.9.0-linux-x64/bin/npm /usr/bin/npm
Last Updated: 3/20/2021, 2:08:45 PM