


Verify that the npm is installed properly.Īs you see below, currently node.js does not have any modules installed. To install an module, use npm install command as shown below. In this example, we are installing MongoDB module to Node.js. Verify that the mongodb Node.js module is installed successfully.

You can also install node manager using yum on RedHat or CentOS as explained in this section.įor this, we need to use add nodesource distribution to our yum repository. If you are using an older version of RedHat or CentOS, then you should make sure EPEL is enabled on your server. The following was done on a CentOS 7 server.įirst, execute the following setup script from nodesource, which will check to make sure your server is supported to install Node.js. Next, if your system is supported, it will also install nodesource package, which is used to install the node.js using yum.

The following is the output of the above curl command. As you see below, this first checks to make sure CentOS7 X86 is supported for Node.js. + rpm -qa 'node|npm' | grep -v nodesource + rpm -i -nosignature -force '/tmp/tmp.IJM36kruJO' + rpm -q -whatprovides redhat-release || rpm -q -whatprovides centos-release || rpm -q -whatprovides cloudlinux-release If supported, it then downloads the nodesource rpm file, and installs the rpm file automatically. # You may also need development tools to build native addons: # Run `yum install -y nodejs` (as root) to install Node.js and npm. Nodesoruce Warning Message on Unsupported System # Your distribution, identified as ".10.x86_64", is not currently supported, please contact NodeSource at if you think this is incorrect or would like your distribution to be considered for support In this example, I tried to install it on CentOS 6 and got the following warning message: If your system is not supported for Node.JS install using nodesource, you’ll get the following error message:
