Setup Node.js and NPM on Ubuntu


Avoid installing Node.js on Ubuntu from the repositories. They are out-dated. The best option is to download the sources and build.

Node.js sources can be downloaded from http://nodejs.org/#download
Alternatively, if you’re a GitHub user, you can clone the repository with:

git clone git://github.com/joyent/node.git

Next step, navigate to the Node.js source root folder and execute the following:

./configure
make
sudo make install

NPM is a package manager for Node similar to Apache Maven, Gradle, SBT etc.

npm is a package manager for node. You can use it to install and publish your node programs. It manages dependencies and does other cool stuff.

Install it with this one line command:

curl http://npmjs.org/install.sh | sh

Copy from srirangan.net

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s