In this article, we will describe two different methods to install Node.js on cPanel server. First command line and Second WHM interface.
- How to install NodeJS via the command line:
- Log into SSH as “root user”.
- Run the following command.
yum install ea-nodejs16 - Use the following command to make sure that it has been installed correctly.
/opt/cpanel/ea-nodejs16/bin/node -v
- How to install NodeJS via the WHM interface:
- Log into your WHM as “root user”.
- Navigate to » Software » EasyApache 4.
- Click on the “Customize” button.
- Search for the “Apache Modules”, type “ea-apache24-mod_env” on the search bar, swipe the toggle to “Install”.
- Navigate to “Ruby via Passenger”, type ” ea-ruby27-mod_passenger” on the search bar, swipe the toggle to “Install”.
- Find out “Additional Packages”, type “ea-nodejs16” on the search bar, swipe the toggle to “Install”.
- After completing the provision, click “Next” to continue.
- Log into your WHM as “root user”.
In this way, you can install Node.js on cPanel server.