
This answer has the same disadvantages as previously mentioned for compiling from source. Sudo ln -s /usr/local/bin/node-waf /usr/bin/node-wafįrankly, the situation for node.js on CentOS/RHEL is rather bad, as none of the repos include node.js (see related question here). Sudo ln -s /usr/local/bin/npm /usr/bin/npm Sudo ln -s /usr/local/lib/node /usr/lib/node sudo ln -s /usr/local/bin/node /usr/bin/node Might not be needed depending on your version. Sudo tar xzvf ~/node-v0.8.22-linux-圆4.tar.gz -strip=1Īnd for me on CentOS 6.3, I had to add the following links so that node and npm commands worked from either regular user or from sudo. Latest_node=$(curl | grep 'linux-圆4.tar.gz' | awk '') Here's the script I use: # get the latest stable binary

There's one more approach I haven't seen listed in any of the other answers, and that is to use the binary distributions for Linux which have been published since 0.8.6 Then install and check the version: # rpm -ivh nodejs-0.8.18-1.x86_64.rpm After that time, it will move into 'Maintenance' until end of life in April 2022.

The 12.x release line now moves into 'Active LTS' and will remain so until October 2020.

Now make the nodejs package: # fpm -s dir -t rpm -n nodejs -v 0.8.18 -C /tmp/nodejs/ usr/bin usr/lib This release marks the transition of Node.js 12.x into Long Term Support (LTS) with the codename Erbium. To create an RPM package, you can use FPM: # wget Install Node.js on Red Hat Enterprise Linux Red Hat Developer Learn about our open source products, services, and company. You can modify the "configure" file to point to python2.7 in line 1 if necessary. Note that this requires Python 2.6+ to use. (cd into extracted folder: ex "cd node-v0.10.3")
