Mac
If you ' re using the excellent homebrew Package Manager, you can install node with one command: brew install node
.
Otherwise, follow the below steps:
- Install Xcode.
- Install git.
- Run the following commands:
darwin_setup.sh
git clone git://github.com/ry/node.git
cd node
./configure
make
sudo make install
You can check it worked with a simple Hello, world! Example.
Ubuntu
Install the dependencies:
sudo apt-get install g++ curl libssl-dev apache2-utils
sudo apt-get install git-core
Run the following commands:
ubuntu_setup.sh
git clone git://github.com/ry/node.git
cd node
./configure
make
sudo make install
You can check it worked with a simple Hello, world! Example.
Thanks to Code-diesel for the Ubuntu dependencies.
Windows
Currently, you must use Cygwin to install node. To does so, follow these steps:
- Install Cygwin.
Use of the setup.exe
Cygwin folder to install the following packages:
- Devel→openssl
- devel→g++-gcc
- Devel→make
- Python→python
- Devel→git
Open the Cygwin command line with Start > Cygwin > Cygwin Bash Shell
.
- Run the below commands to download and build node.
cygwin_setup.sh
git clone git://github.com/ry/node.git
cd node
./configure
make
sudo make install
For more details, including information on troubleshooting, please see the GitHub wiki page.