I’ve been playing with one of my raspberry pi device quite a lot lately and though that it can actually be the perfect little dev server for me as it is quite portable and really powerfull. I bought a multitude of SD sticks for it and even got it to go off a USB flash stick. Its a realy nice tinkerer’s device.
- You have to download the Pi specific version.
- You then have to unpack it.
- You then add it to your bash.rc as an extra path paramater to the extracted node bin path (if your not using bash, it should be similiar in your shell).
#!/bin/bash #Get all the prerequisites needed echo "===== Get all pre req's ! =====" sudo apt-get install python2.7 make echo "=== Go to the local folder where we will deploy. ====" cd /usr/local sudo mkdir node cd node #Get the latest version of Node for PI - at this point in time it is 10.5 echo "===== Downloading Node ! ======" sudo wget http://nodejs.org/dist/latest/node-v0.10.5-linux-arm-pi.tar.gz echo "===== Unpack the archive ! =====" sudo tar xvzf node-v0.10.5-linux-arm-pi.tar.gz echo "===== Rename folder to a simpler name ! =====" echo "===== (RENAMING THE FOLDER IS OPTIONAL) =====" sudo mv node-v0.10.5-linux-arm-pi node-v10.5 cd node-v10.5/ #echo "===== Configure it ! =====" #sudo ./configure #echo "===== Compile and install ! =====" #sudo make #sudo make install echo "==== Add link to path as v 10.5 is compiled already =====" sudo echo 'export PATH=$PATH:/usr/local/node/node-v10.5/bin'>> ~/.bashrc echo"==== Now we will check if it is all there ====" node -v npm -v echo "==== DONE ===="