Skip to content

Instantly share code, notes, and snippets.

@puppybits
Last active June 15, 2021 04:24
Show Gist options
  • Save puppybits/5100026 to your computer and use it in GitHub Desktop.
Save puppybits/5100026 to your computer and use it in GitHub Desktop.
Raspberry Pi Config and Start up Commands
#! /usr/bin.bash
#
# This is a list of commands used to setup my raspberry pi.
# This setups:
# update pi
# setup wifi usb dongle
# pip + django + virtualenv
# nodejs
# ruby
# vnc
# couchdb
# mongodb
# postgres SQL
#
#
# How to make a SD Card OS
# download latest Raspbian: http://www.raspberrypi.org/downloads
# download OSX SD Card Setup: http://alltheware.wordpress.com/2012/12/11/easiest-way-sd-card-setup/
# find which dev your SD Card is on: in Terminal run > df
# Start up the GUI and select your drive
# Put the SD Card in your Pi and plug it in
#
# plug in the power, conenct the enternet to the router, log into the router to find the ip
ssh 192.168.x.x -l pi
# resize SD, change local, keyboard, password and boot to desktop
sudo raspi-config
# update & install git
sudo apt-get update
sudo apt-get install ca-certificates
sudo wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update
sudo chmod +x /usr/bin/rpi-update
sudo apt-get install git-core
sudo rpi-update
sudo shutdown -r now
# install hfs+
sudo apt-get install hfsplus hfsutils hfsprogs
#install afp
sudo apt-get install avahi-daemon libavahi-client-dev libdb5.3-dev db-util db5.3-util libgcrypt11 libgcrypt11-dev
# install netatalk for afp
wget -o - http://prdownloads.sourceforge.net/netatalk/netatalk-3.0.1.tar.gz && tar -xvzf -
cd -
./configure --with-init-style=debian --with-zeroconf
make
sudo make install
sudo touch /usr/local/etc/afp.conf
sudo nano /usr/local/etc/afp.conf
;
; Netatalk 3.x configuration file
;
[Global]
mimic model = RackMac
[Homes]
basedir regex = /home
; [My AFP Volume]
; path = /path/to/volume
/etc/init.d/netatalk start
# setup wifi
wpa_passphrase wifi-landia ----your password----
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
network= {
ssid="wifi-landia"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk=
}
sudo ifconfig wlan0 up
sudo iwlist scan
sudo iwconfig wlan0 essid "wifi-landia" channel 1
sudo wpa_supplicant -B -Dwext -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf
sudo dhclient wlan0
sudo touch /etc/rc2.d/wifiup.sh
sudo nano /etc/rc2.d/wifiup.sh
#! /bin/sh
sudo pkill wpa_supplicant
sudo ifconfig wlan0 down
sudo ifconfig wlan0 up
sudo iwconfig wlan0 essid "wifi-landia" channel 1
sudo wpa_supplicant -B -Dwext -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf
sudo dhclient wlan0
sudo chmod +x /etc/rc2.d/wifiup.sh
# install VNC
sudo apt-get install tightvncserver
vncserver :1 -geometry 1280x800 -depth 16 -pixelformat rgb565:
# install node js
sudo apt-get install nodejs
#install postgres
sudo apt-get install postgresql-9.1
#install couchdb
sudo apt-get install couchdb -y
#install mongo
sudo apt-get install mongodb-10gen
# install pip
sudo apt-get install python-pip python-dev build-essential && sudo pip install --upgrade pip && sudo pip install --upgrade virtualenv
pip install requests && pip install pyquery && pip install simplejson
mkdir ~/www && cd ~/www && mkdir photospread
virtualenv venv --distribute
source venv/bin/activate
pip install django
# create django project
django-admin.py startproject mysite
# install ruby
sudo apt-get install ruby
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment