Chris Hager
Programming, Technology & More

How to install NodeJS 5.x on CentOS and Ubuntu/Debian

NodeJS v5.x is deprecated. Take a look at the current instructions on how to install NodeJS 6.x Long-Term Support (LTS) and NodeJS 7.x.

NodeJS v5.0.0 (stable) was released today, just a month after the v4.x long-term-support (LTS) release! Here is a quick and easy way to install the current NodeJS 5.x (including npm) on CentOS and Ubuntu/Debian.

Installing NodeJS 5.x on CentOS 7

The easiest way is to install the latest NodeJS 5.x from the official RPM repository with the standard package manager, which has the advatage of automatically being able to get updates to NodeJS:

# Install the Repository
rpm -Uvh

# Install NodeJS
yum install nodejs

This is basically the short version of running the official CentOS/Fedora/RHEL install script:

Installing NodeJS 5.x on Ubuntu and Debian

This is the official way to install NodeJS 5.x on Ubuntu, Debian, Linux Mint, Linux Mint Debian Edition (LMDE) and elementaryOS :

# Installing NodeJS 5.x on Ubuntu / Debian
curl -sL | sudo -E bash -
sudo apt-get install -y nodejs

Enjoy NodeJS 5.x, and reach out to me on Twitter @metachris

See also:

Share this post if you like it <3

Posted by Chris Hager in #nodejs  ·  30 Oct 2015