Install nodejs on Centos

Install nodejs on CentOS for Node.js v8 LTS:

1. Get nodejs


[[email protected] ~]# curl --silent --location                                                                                                                     x | sudo bash -


2.Install nodejs


[[email protected] ~]# sudo yum -y install nodejs


3. To compile and install native addons from npm you may also need to install build tools:


[[email protected] ~]# sudo yum install gcc-c++ make


4.Check nodejs


[[email protected] ~]# node -v


[[email protected] ~]# npm -v