yum install -y gcc-c++ make
# v16
curl -sL https://rpm.nodesource.com/setup_16.x | sudo -E bash -
# v14
# curl -sL https://rpm.nodesource.com/setup_14.x | sudo -E bash -
yum install nodejs
node -v
$ curl -sL https://rpm.nodesource.com/setup_12.x | bash -
sudo yum install nodejs
# If you don't have an existing version:
sudo yum install nodejs
# If you have installed:
# Option 1
curl -sL https://rpm.nodesource.com/setup_16.x | bash -
sudo yum install nodejs
# Option 2 (I have issues sometimes with Option 1)
wget http://nodejs.org/dist/v16.14.2/node-v16.14.2.tar.gz
tar xzvf node-v* && cd node-v*
sudo yum install gcc gcc-c++
./configure
make
sudo make install