Chris Hager
Programming, Technology & More

How to install NodeJS 4.x (LTS) on CentOS

NodeJS v4.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.


Recently io.js and node.js merged again into a single codebase in Node v4.0.0. The fork happened in December 2014 and io.js has seen rapid improvements and fast uptake of upstream V8 features.

Now the merge has happened, and with it comes a lot of features from the io.js codebase. NodeJS 4.2.0 has been released on October 12, which is labelled as the first Long Term Support (LTS) release of NodeJS. This means that NodeJS v4.x is going to be officially supported without backward incompatible updates for 30 months, until June 2017.

Sadly the standard installation instructions on the downloads page for installing a current version of node with yum is not updated to the new NodeJS v4.x releases!

So here is a quick and easy way how to install the current NodeJS 4.x LTS (including npm) on CentOS from the official RPM repository.

# Install the repository
rpm -Uvh https://rpm.nodesource.com/pub_4.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm

# Install NodeJS
yum install nodejs

Enjoy NodeJS 4.x LTS on CentOS, and reach out to me on Twitter @metachris

See also:



Share this post if you like it <3
swirl

Posted by Chris Hager in #nodejs  ·  22 Oct 2015


swirl