It is used to develop I/O intensive web applications like video streaming sites, single-page applications, and other web applications.
To follow this blog, you will need:
- One Ubuntu 16.04 server set up by following this initial server setup, including a sudo non-root user.
Node.js Installation In Ubuntu 16.04
Step-1 Update the Package List
Before installing the node.js on to the Ubuntu system, update all available repositories.
sudo apt-get update
Step-2 Install Node.js
Run below command to install standard package of node.js
sudo apt-get install nodejs
Step-3 Install NPM
For installing Node.js the npm package is also required. By using below command we install the npm package.
sudo apt-get install npm
In order for some
npm packages to work (those that require compiling code from source, for example), you will need to install the
sudo apt-get install build-essential
After Installing the node.js and npm we check that installation is correct or not by typing the following commands:
Node.js Installation Check
NPM Installation Check
For removing the node.js from ubuntu system completely we type following commands:
Remove Package without Configuration Files
This command removes node.js but configuration files remain so next time we install node.js than it will be used.
sudo apt-get remove nodejs
Remove Package with Configuration Files
If you don’t want to kept the configuration files then use following command.
sudo apt-get purge nodejs
Finally, Remove Unused Packages
For removing the unused packages that are installed with node.js run the following command:
sudo apt-get autoremove