node官网:http://nodejs.cn/download/
wget https://npm.taobao.org/mirrors/node/v12.11.1/node-v12.11.1-linux-x64.tar.xz
tar -xvf node-v12.11.1-linux-x64.tar.xz
mv node-v12.11.1-linux-x64 nodejs
cp -r nodejs /usr/local/src
ln -s /usr/local/src/nodejs/bin/npm /usr/local/bin/
ln -s /usr/local/src/nodejs/bin/node /usr/local/bin/
[root@centos ~]# node -v
v12.11.1
[root@centos ~]# npm -v
6.11.3
临时换源
npm --registry https://registry.npm.taobao.org install express
永久换源
npm config set registry https://registry.npm.taobao.org
“The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.” – Tom Cargill
标 题:Linux安装最新版node