2016-11-17 08:23:32 -08:00
|
|
|
|
x. Download and install the Raspbian image, follow the install instructions:
|
|
|
|
|
|
|
|
|
|
https://www.raspberrypi.org/
|
|
|
|
|
|
2018-12-03 16:36:34 -08:00
|
|
|
|
x. install the micro SD card, connect keyboard, mouse, screen and finally power
|
|
|
|
|
|
2016-11-17 08:23:32 -08:00
|
|
|
|
Boot and wait for the GUI to load.
|
|
|
|
|
|
|
|
|
|
x. menu -> Preferences -> Raspberry pi configuration
|
|
|
|
|
|
|
|
|
|
change hostname
|
|
|
|
|
|
|
|
|
|
change default pi password
|
|
|
|
|
|
|
|
|
|
change timezone
|
|
|
|
|
|
2018-12-03 16:36:34 -08:00
|
|
|
|
when done navigate to finish
|
|
|
|
|
|
2016-11-17 08:23:32 -08:00
|
|
|
|
(optionally) you can change the boot behaviour to boot to CLI not GUI (saves CPU cycles and power if you’re using the unit “headless”).
|
2018-12-03 16:36:34 -08:00
|
|
|
|
|
|
|
|
|
reboot
|
2016-11-17 08:23:32 -08:00
|
|
|
|
|
|
|
|
|
x. sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
|
|
|
|
|
|
|
|
|
|
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
|
|
|
|
|
update_config=1
|
|
|
|
|
country=GB
|
|
|
|
|
|
|
|
|
|
|
2018-12-03 16:36:34 -08:00
|
|
|
|
network={
|
2016-11-17 08:23:32 -08:00
|
|
|
|
|
|
|
|
|
ssid=“yourSSID”
|
|
|
|
|
psk=“password”
|
2018-12-03 16:36:34 -08:00
|
|
|
|
key_mgmt=WPA-PSK
|
2016-11-17 08:23:32 -08:00
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
network={
|
|
|
|
|
ssid=“WPA_EnterpirseSSID”
|
|
|
|
|
scan_ssid=1
|
|
|
|
|
key_mgmt=WPA-EAP
|
|
|
|
|
pairwise=CCMP TKIP
|
|
|
|
|
group=CCMP TKIP
|
|
|
|
|
eap=PEAP
|
|
|
|
|
identity=“domain_username@doman.com"
|
|
|
|
|
password=“domain_password”
|
|
|
|
|
phase1="peapver=0"
|
|
|
|
|
phase2="MSCHAPV2"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
x. disable wireless power management (some wifi dongles go to power save and cause issues)
|
|
|
|
|
sudo nano /etc/network/interfaces
|
|
|
|
|
|
|
|
|
|
add
|
|
|
|
|
iface wlan 0 inet manual
|
|
|
|
|
wireless-power off
|
|
|
|
|
|
|
|
|
|
iface wlan 1 inet manual
|
|
|
|
|
wireless-power off
|
|
|
|
|
|
|
|
|
|
|
2018-12-03 16:36:34 -08:00
|
|
|
|
x. now that you’re online update the software on your pi
|
2016-11-17 08:23:32 -08:00
|
|
|
|
|
2018-12-03 16:36:34 -08:00
|
|
|
|
sudo apt-get update
|
|
|
|
|
sudo apt-get upgrade
|
|
|
|
|
sudo rpi-update
|
|
|
|
|
reboot
|
|
|
|
|
|
|
|
|
|
x. install the display library
|
2016-11-17 08:23:32 -08:00
|
|
|
|
|
|
|
|
|
sudo curl -sS get.pimoroni.com/unicornhat | bash
|
|
|
|
|
|
2018-12-03 16:36:34 -08:00
|
|
|
|
x. install some useful packages like vim and mail utilities.
|
|
|
|
|
|
|
|
|
|
sudo apt-get install -y vim
|
|
|
|
|
sudo apt-get install -y ssmtp
|
2016-11-17 08:23:32 -08:00
|
|
|
|
sudo apt-get install -y mailutils
|
|
|
|
|
|
2018-12-03 16:36:34 -08:00
|
|
|
|
this one fixes the random number generator:
|
|
|
|
|
sudo apt-get install rng-tools
|
|
|
|
|
|
|
|
|
|
optional if you're using 'lite' version of rasbian:
|
|
|
|
|
sudo apt-get install python-requests
|
|
|
|
|
|
|
|
|
|
x.
|
|
|
|
|
|
|
|
|
|
sudo git clone https://github.com/Kris-Sekula/ACI-Health
|
|
|
|
|
cd ACI-Health
|
|
|
|
|
|
2016-11-17 08:23:32 -08:00
|
|
|
|
sudo mv monitor.py /boot/
|
|
|
|
|
sudo mv mailmyip.sh /boot/
|
|
|
|
|
sudo mv vim-rc .vimdc
|
2018-12-03 16:36:34 -08:00
|
|
|
|
sudo mv ssmtp.conf /etc/ssmtp/ssmtp.conf
|
|
|
|
|
|
|
|
|
|
|
2016-11-17 08:23:32 -08:00
|
|
|
|
x. edit email settings, change hostname and outgoing smtp server
|
|
|
|
|
sudo vi /etc/ssmtp/ssmtp.conf
|
2018-12-03 16:36:34 -08:00
|
|
|
|
|
2016-11-17 08:23:32 -08:00
|
|
|
|
x. test email
|
|
|
|
|
echo "Hello world email body" | mail -s "Test Subject" me@domain.com
|
2018-12-03 16:36:34 -08:00
|
|
|
|
|
2016-11-17 08:23:32 -08:00
|
|
|
|
x. Install cron job to start the monitor function and send email
|
2018-12-03 16:36:34 -08:00
|
|
|
|
|
2016-11-17 08:23:32 -08:00
|
|
|
|
sudo crontab -e
|
|
|
|
|
|
|
|
|
|
@reboot sleep 120 && bash /boot/mailmyip.sh
|
|
|
|
|
@reboot sudo /usr/bin/python /boot/monitor.py
|
|
|
|
|
|
|
|
|
|
x. disable ipv6 if you don’t need it
|
|
|
|
|
sudo vi /etc/sysctl.conf
|
|
|
|
|
|
|
|
|
|
net.ipv6.conf.all.disable_ipv6 = 1
|