Introduction
The Application Manager in cPanel allows users to deploy Phusion Passenger applications, including NodeJS apps. To install a cPanel-provided version of NodeJS on your system, you'll need to install the supporting packages. This article provides the steps to install those packages.
Please note that CloudLinux allows users to use multiple versions of NodeJS through "NodeJS Selector," so CloudLinux users may wish to install the CloudLinux-provided version of NodeJS instead.
Procedure
- Access the server's command line as the 'root' user via SSH or "Terminal" in WHM.
- Use yum/dnf/apt, as appropriate, to install the needed packages.
Please note that in the following commands, "$nodeversion" must be replaced with the desired NodeJS version (i.e., ea-nodejs16, ea-nodejs18, or ea-nodejs20).- CentOS 7
yum install ea-apache24-mod_env ea-apache24-mod-passenger ea-nodejs16
- AlmaLinux 8/9 and Rocky Linux 8/9
dnf install ea-apache24-mod_env ea-ruby27-mod_passenger $nodeversion
- Ubuntu
apt install ea-apache24-mod-env ea-apache24-mod-passenger $nodeversion
- CentOS 7
- Verify that NodeJS has been installed correctly.
/opt/cpanel/$nodeversion/bin/node -v
Please note that "$nodeversion" must be replaced with the installed NodeJS version (i.e., ea-nodejs16, ea-nodejs18, or ea-nodejs20).
Please note that NodeJS is a back-end JavaScript runtime environment. cPanel Support is limited to ensuring the basic functionality of the provided runtime components and cannot directly provide assistance with application code. It's recommended to reach out to a developer for further guidance.
Additional resources
How to install NodeJS Selector on CloudLinux
Comments
0 comments
Article is closed for comments.