Skip to content

Instantly share code, notes, and snippets.

@vahe
Last active December 21, 2015 05:08
Show Gist options
  • Select an option

  • Save vahe/6254093 to your computer and use it in GitHub Desktop.

Select an option

Save vahe/6254093 to your computer and use it in GitHub Desktop.
Install node.js on Raspberry Pi (debian). Source: http://oskarhane.com/raspberry-pi-install-node-js-and-npm/
#!/bin/bash
#Make a new dir where you'll put the binary
sudo mkdir /opt/node
#Get it
wget http://nodejs.org/dist/v0.10.16/node-v0.10.16-linux-arm-pi.tar.gz
#unpack
tar xzf node-v0.10.16-linux-arm-pi.tar.gz
#Copy to the dir you made as the first step
sudo cp -r node-v0.10.16-linux-arm-pi/* /opt/node
#Add node to your path so you can call it with just "node"
cd ~
echo "PATH=$PATH:/opt/node/bin" >> .profile
# echo "export PATH" >> .profile
#Reload profile
source .profile
#Test
node -v
npm -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment