系统相关
首页 > 系统相关> > Linux环境安装安装NodeJS v10.16.3

Linux环境安装安装NodeJS v10.16.3

作者:互联网

1.wget https://nodejs.org/dist/v12.18.3/node-v12.18.3-linux-x64.tar.xz

2.tar xvf  node-v12.18.3-linux-x64.tar.xz -C /usr/local/

3. mv /usr/local/node-v12.18.3-linux-x64 /usr/local/nodejs

echo export NODEJS_HOME=/usr/local/nodejs >> /etc/profile
echo export PATH=$PATH:$NODEJS_HOME/bin >> /etc/profile
echo export NODEJS_PATH=$NODEJS_HOME/lib/node_modules >>/etc/profile
source /etc/profile
ln -s /usr/local/nodejs/bin/node /usr/local/bin/node

ln -s /usr/local/nodejs/bin/npm /usr/local/bin/npm

标签:node,bin,NodeJS,安装,nodejs,profile,usr,v10.16,local
来源: https://www.cnblogs.com/powpoia/p/13620187.html