Automatic Installation Nodejs on any Linux distro in 12 seconds

Written on 13 June 2016

I have write How to install Nodejs LTS on any Linux distro. Here are an automatic script install Nodejs for who want to fast :)

The node-install.sh do something simple like this command

curl https://nodejs.org/dist/v4.2.1/node-v4.2.1-linux-x64.tar.gz | sudo tar xvz --strip-components=1 -C /usr/local

But node-install detect cpu architecture automaticaly.

Download Node install script

curl -o https://gist.githubusercontent.com/epety/f01b15603e2312a6c94179f8f6b828e0/raw/db0e903a705420bbe33b6ed7f5d7dcdb799f2679/node-install.sh  

Change node version
See list here https://nodejs.org/dist/

$ vim node-install
# Change URL to change node version
URL=https://nodejs.org/dist/v4.2.5/  

Install
Install node use root or sudoer user.

sudo bash node-install.sh  

Read another post on Node Deployment Series

Read more on nodejs deploy bash