Enabling NODE.JS (VPS/CLOUD Cpanel)

Install NODE.JS

First of all in order for NODE.JS to be installed correctly to your system the following software should be enabled as well -  bzip2-devel and python.

Below are the commands you need to execute via SSH beforehand to verify software’s version and availability.

CHECK BZIP2-devel AVAILABILITY:

# rpm –qa bzip2-devel

If the output is null then you should install it on the server, you can check through below command, if it is available or not in your yum repository:

# yum list bzip2-devel

Output: Available Packages    bzip2-devel.i686     1.0.5-7.el6\_0                base

If you don't get this output you should install bzip2-devel package through the below command:

# yum install  bzip2-devel

CHECK Python Version AVAILABILITY:

To check Python version installed on your server, please execute below command:

# python -V

Output: Python 2.6.6

Python 2.6.6 or later should install on server, If you are running the latest version of cPanel , python will be already on the latest verson. If you have an old version, please upgrade cPanel before the next steps, this can be achieved with the following command:

# /scripts/upcp --force

NODE.JS INSTALLATION:

Now we are going to install node.js on the server

yum install epel-release yum install nodejs npm npm init # node –v

Output: v6.12.2