How to install NodeJS On Your VPS (Ubuntu)? I have 3 way for installing this. Okay lets checkout this way
From Official
1 2 3 4 |
wget -qO- https://deb.nodesource.com/setup_4.x | sudo bash - or wget -qO- https://deb.nodesource.com/setup_5.x | sudo bash - apt-get install -y nodejs |
Using ppa:chris-lea
1 2 3 4 |
sudo apt-get install -y python-software-properties python g++ make sudo add-apt-repository ppa:chris-lea/node.js sudo apt-get update sudo apt-get install nodejs npm |
From Source Code
1 2 3 4 5 6 |
wget https://nodejs.org/dist/v4.2.6/node-v4.2.6.tar.gz sudo tar -xzf node-v4.2.6.tar.gz cd node-v4.2.6/ sudo ./configure sudo make sudo make install |
From Binary
1 2 3 4 5 |
wget https://nodejs.org/dist/v4.3.2/node-v4.3.2-linux-x64.tar.xz apt-get install xz-utils tar -C /usr/local --strip-components 1 -xJf node-v4.3.2-linux-x64.tar.xz ls -l /usr/local/bin/node ls -l /usr/local/bin/npm |