inside the mind of a linux admin

How do you install Node.JS on CentOS?

There’s a ton of outdated information floating around the web on how to simply and effectively install Node.JS on CentOS, specifically one of my legacy boxes that runs 5.11. I spent about 15-20 minutes toying around with various hacky ways to do this. To save you the time, here’s the easiest way I found:

Perform (as root):


curl -sL https://rpm.nodesource.com/setup | bash -
yum install -y nodejs

If you’re a security fanatic like myself, you’ll likely want to first download the ‘setup’ script before piping it to bash. If you don’t care, I can assure you I’ve reviewed the code and rpm.nodesource.com is a trusted source.

It will output each step as it moves along, prompting you to manually install any 3rd party dependencies.

Once done, verify your install with:


node -v

Related Posts

synergy: How to enable crypto (encryption) and generate SSL certificate

The newer Linux versions of the popular mouse/keyboard sharing application “synergy” now has built in encryption. Here’s how to configure it: Just simply passing the –enable-crypto flag on your synergy server without having a proper SSL certificate will result in the inability to connect to clients and generate an error message similar to this in […]

Read More

Change Number Pad Delete (dot) key from a comma in Ubuntu Linux

I recently purchased a new keyboard and updated to the latest Ubuntu, I’m also an avid user of the number pad for quick input when dealing with spreadsheets or accounting. I found that my num pad’s delete key (“.”) was outputting a comma (“,”) instead. Pretty annoying? I agree, but this can be very easily […]

Read More

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.