Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Embed URL


Subversion checkout URL

You can clone with
Download ZIP
raspberry pi scripts

raspberry pi setup stuff

what these instructions/files are useful for:

  • make raspberry pi run processes (like node.js servers) automatically on startup and have them monitored by a process monitor
  • get node running on the pi
  • install the raspbian OS on an sd card and boot the pi up and login over ssh


  • after cloning the stuff in you'll have to make and make install everything manually. node will take hours to compile
  • put mongroup.conf in /home/pi/mongroup.conf
  • put mongroup-startup.conf in /etc/init/mongroup.conf
  • install upstart with apt-get install upstart and ignore the warnings
  • remove the secure_path statement from /etc/sudoers so sudo gets your users PATH
  • you can add new lines to ~/mongroup.conf to configure new things that should always be running when the raspi is on
  • if you do the raspi-config sd card expand thing it may cause your next restart to take a lonnnggg time
# this formats a sd card to boot raspberry pi, you can then hook up to raspi over ethernet cable from
# a mac computer. turn on internet sharing in sys prefs first and then the raspi should be
# first download and unzip to raspbian.img
# you might have to change the device name, /dev/disk1s1 is what mac os usually mounts sd cards as
# the dd command might take a couple of minutes, hit ctrl+t to check status
sudo diskutil unmount /dev/disk1s1
sudo dd bs=1m if=raspbian.img of=/dev/rdisk1
sudo diskutil eject /dev/rdisk1
function handler(req, res) { res.end('hello world!') }
pids = /var/run/
logs = /var/log/
web = node /home/pi/index.js
sudo apt-get upgrade
sudo apt-get install build-essential libssl-dev git screen avahi-daemon vim upstart
mkdir src
git clone src/node
git clone src/mon
git clone src/mongroup
description 'startup processes'
author 'maxogden'
start on runlevel [0123456]
exec start-stop-daemon --start -u pi --chdir /home/pi --exec /usr/local/bin/mongroup start

when I try to compile node on my pi w/this I consistently get:
Illegal instruction
make[1]: *** [/home/pi/src/node/out/Release/] Error 132
make[1]: Leaving directory `/home/pi/src/node/out'
make: *** [node] Error 2

I have the 256mb version is yours the 512mb? Having a bitch of a time trying to get a recent node version to run on it. Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.