没有wget的话,yum install -y wget
wget https://npm.taobao.org/mirrors/node/latest-v11.x/node-v11.4.0-linux-x64.tar.gz
#解压在opt目录下
tar zxf node-v11.4.0-linux-x64.tar.gz
环境变量:
sudo ln -s /opt/node-v11.4.0-linux-x64/bin/node /usr/local/bin/
sudo ln -s /opt/node-v11.4.0-linux-x64/bin/npm /usr/local/bin/
sudo ln -s /opt/node-v11.4.0-linux-x64/bin/node /usr/local/bin/
sudo ln -s /opt/node-v11.4.0-linux-x64/bin/npm /usr/local/bin/
sudo ln -s /opt/node-v11.4.0-linux-x64/bin/node /usr/local/bin/
sudo ln -s /opt/node-v11.4.0-linux-x64/bin/npm /usr/local/bin/:
sudo ln -s /opt/node-v11.4.0-linux-x64/bin/node /usr/local/bin/
sudo ln -s /opt/node-v11.4.0-linux-x64/bin/npm /usr/local/bin/