Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
143 lines (93 sloc) 3.72 KB

Title: How to Install Node.js Author: Node Knockout Date: Sat, 11 Sep 2010 22:40:19 GMT Node: v0.2.1

This was the first in a series of posts leading up to Node.js Knockout on how to use node.js.

I have been given permission to repost the articles from the contest here (in wheat format) for general consumption. Expect more to come.

In this post we detail how to install node on Mac, Ubuntu, and Windows.


If you're using the excellent homebrew package manager, you can install node with one command: brew install node.

Otherwise, follow the below steps:

  1. Install Xcode.
  2. Install git.
  3. Run the following commands:


You can check it worked with a simple Hello, World! example.

Debian (Ubuntu/ Mint)

With Aptitude package manager one can install the package nodeJS then edit their bash config to redirect the command node to nodejs.

sudo apt-get update
sudo apt-get install nodejs
sudo apt-get install npm

nano (edit / vim) the file ~/.bashrc and add the line: alias node="nodejs"

Redhat (Fedora / CentOs)

Simply install from official repos:

sudo yum install nodejs npm

If that fails, enable EPEL repo:

curl --silent --location | bash -

Then simply install from repo:

yum -y install nodejs 


In portage tree:

emerge nodejs


In official repo use pacman package manager:

pacman -S nodejs npm

Linux from source

  1. Install the dependencies ( Below example using debian apptitude package manager): g++ curl libssl-dev apache2-utils git-core build-essential

    • sudo apt-get install g++ curl libssl-dev apache2-utils git-core build-essential
  2. Run the following commands:


You can check it worked with a simple Hello, World! example.

Thanks to code-diesel for the Ubuntu dependencies.


Currently, you must use cygwin to install node. To do so, follow these steps:

  1. Install cygwin.

  2. Use setup.exe in the cygwin folder to install the following packages:

    • devel → openssl
    • devel → g++-gcc
    • devel → make
    • python → python
    • devel → git
  3. Open the cygwin command line with Start > Cygwin > Cygwin Bash Shell.

  4. Run the below commands to download and build node.


For more details, including information on troubleshooting, please see the GitHub wiki page.

Hello Node.js!

Here's a quick program to make sure everything is up and running correctly:


Run the code with the node command line utility:

> node hello_node.js
Server running at

Now, if you navigate to in your browser, you should see a nice message.


You've installed node.js.