In a previous article I laid out the steps to install NodeJS and NPM on Ubuntu 10.04. Today I’m going to slightly update and hopefully simplify those steps and bring the version of Ubuntu up to 10.10. This will be a quick and to the point article showing only what you need to get working with NodeJS and NPM.
From the Ubuntu command line issue the following commands (if you want to use apt-get, or see the next section for using aptitude):
Using apt-get:
$ sudo apt-get update $ sudo apt-get install git-core curl build-essential openssl libssl-dev $ git clone https://github.com/joyent/node.git && cd node $ ./configure $ make $ sudo make install $ node -v $ cd $ curl http://npmjs.org/install.sh | sudo sh
Using aptitude (and assuming it is not currently installed):
$ sudo apt-get update $ sudo apt-get install aptitude $ sudo aptitude install git-core curl build-essential openssl libssl-dev $ git clone https://github.com/joyent/node.git && cd node $ ./configure $ make $ sudo make install $ node -v $ cd $ curl http://npmjs.org/install.sh | sudo sh
NodeJS and NPM should now be installed. You can test NodeJS out like so:
$ node -v
Type the following into your editor of choice:
var sys = require('sys');
sys.puts('Hello World');
Save the file as helloworld.js.
Run the code like so:
$ node helloworld.js
Easy as that!






Works perfectly, thanks! One thing has changed though, the node github project is at https://github.com/joyent/node.git now.
@Rune,
Thanks, updated.
Chad
.deb package for 10.04, but I think they will work in 10.10 to:
http://mvtm.livejournal.com/489313.html
Pingback: Build a simple chat web app with JQuery Mobile and NowJS (a module for NodeJS) | Giant Flying Saucer
Pingback: Run a chat server with NowJS (using NodeJS) on Ubuntu 10.10 | Giant Flying Saucer
what about the client part?
same process and installation?
i’m just only a beginner..thx
@Carlson,
What client part are you talking about? The above article was done on Ubuntu 10.10 (Desktop).
Chad
i want to make a chat server between two PCs (network them)
i already install nowjs in the pc1 and it works..what about for pc2?the same installation?thx
@carlson,
The same client should work on all machines. See my article here:
http://www.giantflyingsaucer.com/blog/?p=2523
Chad
thx dude..if i run the nowjs at the terminal of pc1, should i also run it in pc2?even though they are now connected to each other(lan network)..
i am thinking that pc2 will connect through http://localhost:8080?is it right?
@carlson,
localhost won’t work for the second pc, you need to use the ip address of the pc where the nowjs server is running.
Chad
i try it, the second pc connect to the server via ip of server but in the terminal it does not detect the second pc..help, thx
Pingback: Getting started with CouchDB and NodeJS on Ubuntu 10.10 | Giant Flying Saucer
The aptitude example still points to https://github.com/ry/node.git instead of joyent
@Anonymous,
Thanks, fixed.
Chad
Pingback: Using NodeJS with MySQL | Giant Flying Saucer
thanks to your tutorial brader
Pingback: Installing Node.js and NPM on Ubuntu 11.04 | Giant Flying Saucer
Pingback: Cómo instalar Node.js | Chalchicha.es
Just a noob question …
I have seeen a lotta tuts on node.js but nothing explains the folder architecture/where exactly the helloworld.js should be saved …
it will be cool if you can share your thoughts
hey chad the website for the line:
git clone https://github.com/joyent/node.git && cd nod
is not working when i check the website its not functional anymore can you give me another one that is working i really wanna do this project.
more power
The “sys” module is now called “util”. It should have a similar interface:
var sys = require(‘util’);
sys.puts(‘Hello World’);