Install Nodejs from standard binaries in Linux
In this post, i will show you how to install Node.js from standard binaries(https://nodejs.org/) in Linux.
First check your system architecture with following commands:
1 |
getconf LONG_BIT |
1 |
uname -p |
On my system, the above two commands gave output 64 and x86_64 respectively. This means i need to install 64-bit version of Node.js.
Now lets download the latest version of Node.js from https://nodejs.org/. The current LTS release is 4.2.2.
1 |
wget https://nodejs.org/dist/v4.2.2/node-v4.2.2-linux-x64.tar.gz |
After file is downloaded, run the following command to install Node.js
1 |
tar -C /usr/local --strip-components 1 -xzf node-v4.2.2-linux-x64.tar.gz |
The above command will install node & npm in “/usr/local/bin“. You can check whether its installed by typing following commands:
1 |
node -v |
1 |
npm -v |