Quantcast
Channel: Planet Python
Viewing all articles
Browse latest Browse all 22462

Chris Hager: How to install NodeJS 4.x on CentOS

$
0
0

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 on CentOS from the official rpm repository:

VER=$(curl -sS https://nodejs.org/download/release/index.tab | sed -n 2p | awk '{print $1}'| sed "s/v//")URL="https://rpm.nodesource.com/pub_4.x/el/7/x86_64/nodejs-${VER}-1nodesource.el7.centos.x86_64.rpm"echo rpm -Uvh $URL
rpm -Uvh $URL

Have fun with NodeJS 4.x!


Viewing all articles
Browse latest Browse all 22462

Trending Articles