I like hands-on learning, so while I was going through the how-to videos I wanted to use Node.JS to follow along. So, here are the steps to get Node.JS and Node Package Manager on your Ubuntu machine.
Here is my setup:
Ubuntu 11.04 64 bit (Natty Narwhal)
I am installing on a VMWare Natty Narwhal 32 bit image.
1. Install some needed packages
You’ll need some packages from synaptic to start:
So open up Synaptic Package Manager, and install those 2 packages (and of course the dependencies too). If you don’t know how to install the packages, you probably should not be trying to use NodeJS, stick with ASP.NET MVC 😉
2. Install and Build NodeJS
So according to the webcasts I have seen, since NodeJS in “bleeding edge”, it is best to download and compile from the source.
- Go to http://nodejs.org/#download
- Copy link location
- Note: The version number in the link will most likely change as of the time of this writing
curl -O http://nodejs.org/dist/node-v0.4.7.tar.gz
tar -xvf node-v0.4.7.tar.gz
sudo make && sudo make install
3. Install Node Package Manger
- For starters we do NOT want to do Node Package Management with sudo, so according to this article, this is our first command
- Open Terminal
sudo chown -R $USER /usr/local
curl http://npmjs.org/install.sh | sh
Congratulations! You now have NodeJS and Node Package Manger installed on you Ubuntu machine! Time to start coding with NodeJS! I don’t know how to yet, but you need to start somewhere 🙂
Please add comments or questions below.
End of Line.