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

Touchpad stops working after sleep + resume (Fedora 26 on Dell XPS)

After recently upgrading my Dell XPS 13 w/Touchscreen to Fedora 26, the touchpad suddenly stopped working upon resuming from sleep mode. It was reproduced 100% of the time, and required a complete restart in order to get the touchpad working again. There have been several forum posts and bug reports regarding others experiencing these exact […]

Read More

Fun with fsck on Fedora – avoiding mounted partitions and handling LUKS encrypted ones

I run Fedora on a few of my machines, and inevitably over the course of time the filesystem will need to be repaired because of orphaned inodes, wrong free byte counts, etc. Typically when EXT4 errors are detected during boot, Fedora will detect this and offer to drop you into “Emergency mode” or continue. example: […]

Read More

Leave a Reply

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

Tweeter button Facebook button Myspace button