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
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
nodemon too while developing, and take them to global after install
npm -i -g pm2 npm -i -g nodemon