NodeJS

Install on CentOS

If you already have NodeJS installed then you'll need to remove it:

1
yum remove -y nodejs

You can now install the required version:

1
2
3
4
5
# For version 8 you need: https://rpm.nodesource.com/setup_8.x for example
curl -sL https://rpm.nodesource.com/setup_{node major version}.x | bash -
# Clean out the current yum cache so we get the correct version
yum clean all
yum install -y nodejs

You should now have the correct version:

1
node -v