1 创建目录
mkdir /app/
2 下载地址和安装配置
cd /app/
wget https://download.csdn.net/download/tangbin0505/15490487
tar zxf node-v10.15.0-linux-x64.tar.gz
#chown -R app:app /app/node-v10.15.0-linux-x64/
rm -rf node-v10.15.0-linux-x64.tar.gz
cat > /etc/profile.d/node.sh << 'EOF'
# set node environment
export NODE_HOME=/app/node-v10.15.0-linux-x64/
export PATH=$PATH:$NODE_HOME/bin
EOF
source /etc/profile.d/node.sh
node -v
npm -v
pm2 -v