Knowledge Base

How to install Node.js using the A2 QuickInstaller

This article describes how to use the A2 QuickInstaller to install Node.js on your system.

The A2 QuickInstaller is no longer supported, and is only available on older VPS hosting packages. On newer VPS hosting packages, you can use Webuzo to quickly and easily install a wide range of applications and manage your server.

To check if the A2 QuickInstaller supports this application for your Linux distribution, please see this article.

Installing Node.js

To install Node.js, follow these steps:

  1. Use SSH to log in to your system as the root user.
    To use the A2 QuickInstaller, you must log in as the root user using SSH. You cannot use the serial console in the VPS Control Panel to run the A2 QuickInstaller.
  2. To start the A2 QuickInstaller, type the following command, and then press ENTER:
    sh /usr/sbin/quickinstaller.sh
  3. Under Application Installers, type the option number for Frameworks, and then press ENTER.
  4. On the Framework Menu, type the option number for Node.js, and then press ENTER. The A2 QuickInstaller updates your system, and then begins the installation process.
    The installation process takes some time to complete. Do not interrupt the installation process.
  5. The A2 QuickInstaller notifies you when installation is complete.

Testing the Node.js installation

To verify that Node.js installed correctly on your system, follow these steps:

  1. Create a file named helloworld.js that contains a basic line of Node.js code. To do this, type the following command at the command line, and then press ENTER:
    echo 'console.log("Hello World!");' > helloworld.js
    
  2. To run the program, type the following command at the command line, and then press ENTER:

    node helloworld.js
    

    You should see the following output:

    Hello World!

Installing the npm Node.js package manager

To install the npm Node.js package manager, follow these steps:

  1. Use SSH to log in to your system as the root user.
  2. At the command prompt, type the following command, and then press ENTER:
    curl https://npmjs.org/install.sh | sh
  3. After the installation process completes, type the following command to verify that npm is installed and functioning correctly:

    npm help

More Information

For more information about Node.js, please visit http://nodejs.org.