ACI-Health/setup_pi_monitor.txt

114 lines
2.4 KiB
Plaintext
Raw Normal View History

2016-11-17 08:23:32 -08:00
x. Download and install the Raspbian image, follow the install instructions:
https://www.raspberrypi.org/
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
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 youre using the unit “headless”).
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
network={
2016-11-17 08:23:32 -08:00
ssid=“yourSSID”
psk=“password”
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
x. now that youre online update the software on your pi
2016-11-17 08:23:32 -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
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
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
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
2016-11-17 08:23:32 -08:00
x. test email
echo "Hello world email body" | mail -s "Test Subject" me@domain.com
2016-11-17 08:23:32 -08:00
x. Install cron job to start the monitor function and send email
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 dont need it
sudo vi /etc/sysctl.conf
net.ipv6.conf.all.disable_ipv6 = 1