First of all, open a terminal and execute the following commands:
cd /usr/src sudo wget http://nodejs.org/dist/v0.8.16/node-v0.8.16.tar.gz
This will change the directory to /usr/src/ and download Node.JS version 0.8.16. I know this is not the last version, but I needed that because my project runs on it and it's not yet time to upgrade to the latest version (even though I'm pretty sure everything is going to be all right).
After the download is completed, extract the tarball:
sudo tar xvzf node-v0.8.16.tar.gz cd node-v0.8.16
After this you will be in the Node folder, you then should execute the following three commands to build Node.
sudo ./configure sudo make sudo make install
This process requires quite some time to complete (especially make). I suggest you don't waste time waiting it to be completed and do something else. Raspberry Pi is not going to break if connected for too much time.
After the commands are finished, Node.JS is ready to be used! You can either run some test with the following commands:
sudo make test
Or just start writing your own web server.
0 comments:
Post a Comment