Easy Way to Install Nodejs on Ubuntu 16.04(Useful!!!!)

There are many methods to install on Ubuntu, such as NVM, n, PPA, complie, But if just want to install specific version, it would be easily. Just do as follow.

Download Nodejs Linux Binaries

Visit the page: https://nodejs.org/en/download/

Download the Linux Binaries what you wanted. Extarct the file to your home directory, such as nodejs.

Set the PATH

Open the terminal, and type

sudo vi /etc/profile.d/node.sh

and input the PATH as follow

export NODE_HOME=/your/nodejs/path
export PATH=$PATH:$NODE_HOME/bin
export NODE_PATH=$PATH:$NODE_HOME/lib/node_modules

Test it

Open the terminal, and type

node -v

if it works, you would see the info like this

v6.9.5
 标签: Linux, NodeJS, 前端开发

作者  :  sailor

一蓑烟雨看苍生,半壶浊酒笑红尘



最新文章