How to install NodeJS 7.x on Ubuntu/Debian and CentOS
NodeJS 7.x is the current stable release of the NodeJS, which is actively maintained in parallel to NodeJS 6.x Long-Term Support (LTS). At the moment, the latest version is NodeJS v7.4.0, and you can find the NodeJS v7.x Changelog here on Github.
This guide shows a quick and reliable way to install the current NodeJS 7.x version (including
npm) on Ubuntu/Debian and CentOS, using the system package manager, in order to continually receive security updates without risking a major version jump with possibly breaking changes.
Installing NodeJS 7.x on Ubuntu and Debian
This is the official way to install NodeJS 7.x on Ubuntu, Debian, Linux Mint, Linux Mint Debian Edition (LMDE) and elementaryOS:
The setup_7.x bash script basically just checks whether your operating system version is suppored and adds the corresponding repository (eg.
https://deb.nodesource.com/node_7.x xenial InRelease).
Installing NodeJS 7.x on CentOS 7
NodeJS provides a script for CentOS/Fedora/RHEL based distributions, which checks your operating system and adds the corresponding RPM repository for
yum, the standard package manager:
The content of the script can be found here: https://rpm.nodesource.com/setup_7.x.
For feedback, ideas and recommendations, contact me on Twitter.