Install latest nodejs (4.2.1 or 5.0) on centos 7 using yum

centos7node.jsyum

Is there any way to install the latest nodejs (version 4.2.1 or 5.0) on CentOS 7 using yum? Of course I could install it otherwise, e.g. from source, but I would like to keep it maintainable… And currently available in EPEL version is 0.10.36, see https://dl.fedoraproject.org/pub/epel/7/x86_64/repoview/nodejs.html

Best Answer

Nodesource provides repositories for both nodejs 4x and 5x.

For example, to install the repo for the 4x branch, run as root:

    # curl -sL https://rpm.nodesource.com/setup_4.x | bash -

Then you can install nodejs via yum:

    # yum install nodejs

Source: https://github.com/nodesource/distributions