Upgrade Node.js in CentOS 7

Reading Time: 2 minutes

If you have installed your node.js in your CentOS 7 Virtual Machine, and there is a need for you to upgrade node.js to its latest version, you are in the right place. 

But first, check your node.js version by the command below:

node -v

You should have this output below:

image-72 Upgrade Node.js in CentOS 7

In our situation, let us upgrade node.js to v8.x, run the command below:

curl -sL https://rpm.nodesource.com/setup_8.x | bash -
image-73 Upgrade Node.js in CentOS 7
yum install nodejs -y
image-74 Upgrade Node.js in CentOS 7

From here, you should be all set. You may check your node.js version by:

node -v
image-75 Upgrade Node.js in CentOS 7

Great Job.

Source: github.com/nodesource/distributions#installation-instructions

Was this post helpful?

This Post Has One Comment

  1. Eve

    wow thankyou for the article, i been stuck on mine, from 6.* upgrade to 10.* I solve mine with ‘sudo yum remove -y nodejs npm’ first and reinstall then

Leave a Reply