Install latest Nodejs and NPM on CentOS 7

NodeJS and NPM are mostly must-have tools for developer now days. Here a list of small cheatsheet for me to make my life easier for next time. I suggest use the stable version in production case.

Install later version:

# yum install -y gcc-c++ make
# curl -sL https://rpm.nodesource.com/setup_14.x | sudo -E bash -

Install stable version:

# yum install -y gcc-c++ make
# curl -sL https://rpm.nodesource.com/setup_12.x | sudo -E bash -

Install on CentOS

Install NodeJS globally in the machine

sudo yum install nodejs

Check version and verify npm and nodejs

Always check your version and make sure it works !

node -v 
npm -v 

Hints

I like pm2 and nodemon too while developing, and take them to global after install NodeJS and NPM

npm -i -g pm2
npm -i -g nodemon

Tags:

Leave a Comment

Your email address will not be published.

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