(ve):Install Node.js on Ubuntu

  • This page was last modified on November 22, 2010, at 10:41.
The (mt) Community Wiki is a collaborative project. Any (mt) Media Temple customer or employee may contribute. Not all articles and/or content have been tested for accuracy by (mt) Media Temple.

For officially moderated and tested articles, be sure to visit our KnowledgeBase.

From (mt) Community Wiki

Node.JS is a new and exciting application server technology under heavy development. Essentially, it allows developers to create web applications with rich functionality using the Javascript language via V8.

The instructions provided here work with Ubuntu's Karmic (9.10) and Lucid (10.04) releases. Both of these are available options with the (ve) server. The newest release at the time of this writing (2010-06-18) is the Lucid release. We recommend using this release as it will have the most current application software easily available in the standard repositories.

Fortunately, a (mt) Media Temple employee has packaged Node.JS for these Ubuntu releases, which makes installation essentially trivial.

First, install the python-software-properties package which helps you interface with the Ubuntu Launchpad platform.

All the following commands assume you are shelled into your server as the root user via SSH.
apt-get update
apt-get -y install python-software-properties

Next, add the node.js repository.

add-apt-repository ppa:chris-lea/node.js

This will take care of installing the signing key and setting up the repository. Once this is done, installing the software is two more quick commands away.

apt-get update
apt-get -y install nodejs

This will install the software for you on your system. You may also be interested in installing the nodejs-dev and nodejs-dbg packages if you are interested in contributing to the Node.JS project itself.

An important caveat with these packages is that the Debian project has elected to rename the executables in these packages from simply node* to nodejs* to avoid naming conflicts with another package. Specifically, if you compile the software directly from source, you will get three executables called node, node-repl, and node-waf. The executables that these packages install are called nodejs, nodejs-repl, and nodejs-waf respectively. This name change does not affect the functionality in any way.

Now that you've installed Node.JS, you may wish to consult the documentation to get started with your development projects. Enjoy!