Node.js Installation Methods July 2016 Edition
Follow up with the previous blog on various methods to install Node.js, here is the updated one with Node.js v4.x and v6.x versions.
Install Node.js v4.x via NodeSource[^1] setup script:
|
|
sudo -E
option indicates to the security policy that the user wishes to preserve their existing environment variables[^2].
With Docker and Dockerfile, sudo
should be removed, because root:
|
|
Install Node.js v6.x via the same method:
|
|
The above installation method has been tested on:
- Debian 8.5
- Node.js v4.4.7 and v6.2.2
In summary, the methods to install Node.js covered are:
- Package manager
- Nodesource script
- From the source
[^1]: NodeSource provides binary distribution setup and support scripts.
[^2]: See man sudo
.