How to install NodeJS 6.x Long-Term Support (LTS) on Ubuntu/Debian and CentOS
NodeJS 6.x is the current NodeJS long-term support (LTS) release, with NodeJS v6.9.4 being the most recent release as of time of writing. This guide shows a quick and reliable way to install the current NodeJS 6.x LTS version (including
npm) on Ubuntu/Debian and CentOS.
We will use the system package manager (eg.
yum) to install NodeJS 6.x, to be able to continually receive security updates without risking a major version jump with possibly breaking changes.
You can jump directly to the installation instructions here:
About NodeJS Long-Term Support (LTS)
Every major version covered by the LTS plan will be actively maintained for a period of 18 months from the date it enters LTS coverage. Following those 18 months of active support, the major version will transition into “maintenance” mode for 12 additional months.
NodeJS 6 LTS will be actively maintained until April 2018, and passively maintained until April 2019, as shown in the image above. It is recommended to use the long-term support version for client projects, in order to be guaranteed a long active maintenance with security updates..
Installing NodeJS 6.x LTS on Ubuntu and Debian
This is the official way to install NodeJS 6.x on Ubuntu, Debian, Linux Mint, Linux Mint Debian Edition (LMDE) and elementaryOS:
The setup_6.x bash script basically just checks whether your operating system version is suppored and adds the corresponding repository (eg.
https://deb.nodesource.com/node_6.x xenial InRelease).
Installing NodeJS 6.x LTS 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_6.x.
For feedback, ideas and recommendations, contact me on Twitter.