ubuntu install node.js

$ sudo apt-get update
$ sudo apt-get install git-core
$ sudo apt-get install build-essential openssl libssl-dev


 

$ git clone https://github.com/joyent/node.git && cd node
$ ./configure
$ make
$ sudo make install
$ git checkout v0.6.0
$ ./configure
$ make
$ sudo make install

 

$ node -v


 

 
$ sudo apt-get install curl

 

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

 

 

Note: Don’t use sudo for the above command. If you get a permission error you can refer to the NPM site to troubleshoot. I ran this command and it worked for me:

 

$ sudo chown -R $USER /usr/local
npm install socket.io 

 

$ git clone git://github.com/LearnBoost/Socket.IO-node.git socket.io-node --recursive && cd socket.io-node/example/

 

$ sudo node server.js

 

 

posted @ 2011-12-04 20:57  邪恶梦想  阅读(514)  评论(0编辑  收藏  举报