Node.js is a widely used open-source JavaScript runtime environment designed to build scalable network applications. Node.js lets developers use JavaScript to write command-line tools and server-side scripts outside of a browser.
Here we detail the steps to install Node.js using the EasyApache 4 interface in WHM or via the command line on your VPS or Dedicated Server.
Related Article
Install via WHM
IMPORTANT: This solution will require root access. If this needs to be obtained, follow the guide on requesting root access.
NOTE: This guide covers installing the version of Node.js currently provided by cPanel. For other versions, manual installation will be required. If assistance is needed, you will need to purchase InMotion Solutions time.
- Log into Root WHM
- Navigate to Software>EasyApache 4
- Click the Customize button in the Currently Installed Packages section
- Select Additional Packages
- Click the toggle button to the right of nodejs16 so that it turns blue and the word Install appears
- Select Review
- Scroll to the bottom of the page and click on the Provision button
- Wait for the provisioning process to complete
TIP: To call Node from the command line using thenodecommand, either use the full path/opt/cpanel/ea-nodejs16/bin/nodeor reach out to Technical Support to configure the PATH variable.
EXAMPLE:
userna5@vpsid [~]$ /opt/cpanel/ea-nodejs16/bin/node --version v16.20.0
Install via Command Line
IMPORTANT: This solution will require root access. If this needs to be obtained, follow the guide on requesting root access.
NOTE: This guide covers installing the version of Node.js currently provided by cPanel. For other versions, manual installation will be required. If assistance is needed, you will need to purchase InMotion Solutions time.
- Access the server via SSH as the root user or using the Terminal in your Root WHM
- Run the following command
yum -y install ea-nodejs16
- Wait for the installation to complete
TIP: To call Node from the command line using thenodecommand, either use the full path/opt/cpanel/ea-nodejs16/bin/nodeor reach out to Technical Support to configure the PATH variable.
EXAMPLE:
userna5@vpsid [~]$ /opt/cpanel/ea-nodejs16/bin/node --version v16.20.0
Comments
0 comments
Article is closed for comments.