In this guide, we’ll show you how to get started with Node.js on an Ubuntu 14.04 server.
How To Install the Distro-Stable Version
Ubuntu 14.04 contains a version of Node.js in its default repositories that can be used to easily provide a consistent experience across multiple servers. The version in the repositories is 0.10.25. This will not be the latest version, but it should be quite stable.
In order to get this version, we just have to use the
apt package manager. We should refresh our local package index prior and then install from the repositories:
sudo apt-get update sudo apt-get install nodejs
If the package in the repositories suits your needs, this is all that you need to do to get set up with Node.js. In most cases, you’ll also want to also install
npm, which is the Node.js package manager. You can do this by typing:
sudo apt-get install npm
This will allow you to easily install modules and packages to use with Node.js.
Because of a conflict with another package, the executable from the Ubuntu repositories is called
nodejs instead of
node. Keep this in mind as you are running software.