Raspberry Pi and Node.js
- Raspberry Pi (Model B)
- 8GB SD card (class 4)
- Micro USB cable
- USB wall charger with minimum specs of 700mA at 5V.
- The basics: monitor, keyboard, mouse, and wired network connection.
Installing Raspberry Pi (NOOBS)
Detailed setup instructions can be found here. SSH is installed by default. After initial setup, Raspberry Pi can be run in a headless configuration.
- Download offline or online setup.
- Extract and copy files to FAT formatted SD card.
- Plug in the SD card into the Raspberry Pi.
- Plug in keyboard, mouse, monitor, and network.
- Lastly, plug in the power.
The NOOBS installation will have a few choices for OSes to install. This tutorial is based on the Rasbian flavor.
- Select the Rasbian OS and select/click Install.
- After setup is complete you will configuration (raspi-config).
- At minimum change your password and set the date and time.
- To run through the configuration again, run
After configuration is completed, check for updates.
sudo apt-get upgrade sudo apt-get update
At the time of writing, the stable version of Node.js for Raspberry Pi is 0.10.24.
Download and extract Node.js binaries.
wget http://nodejs.org/dist/v0.10.24/node-v0.10.24-linux-arm-pi.tar.gz tar -xvzf node-v0.10.24-linux-arm-pi.tar.gz
- Test that node works as expect:
node-v0.10.2-linux-arm-pi/bin/node --versionshould output
- Move installation dir:
mv node-v0.10.24-linux-arm-pi /usr/local/bin/node
.bash_profile to add the node installation dir to the environment variables and the node
bin folder to the path. Using vi, open the file
- Load your saved profile
- Test to make sure settings were loaded:
node --versionshould print the version as expected.
If native binaries need to be built, install node’s native build tool,
npm install -g node-gyp
blog comments powered by Disqus