# 1、创建目录 mkdir -p /usr/local/lib/nodejs/
# 2、下载安装包 wget https://nodejs.org/dist/v8.16.0/node-v8.16.0-linux-x64.tar.xz
# 3、解压 tar -xJvf node-v8.16.0-linux-x64.tar.xz -C /usr/local/lib/nodejs/
# 4、配置环境变量 vim ~/.bash_profile
# Nodejs VERSION=v8.16.0 DISTRO=linux-x64 export PATH=/usr/local/lib/nodejs/node-$VERSION-$DISTRO/bin:$PATH
|