-
Notifications
You must be signed in to change notification settings - Fork 3
/
raspberryPi.txt
139 lines (88 loc) · 2.93 KB
/
raspberryPi.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
===== SSH Static IP connection.
+ Enable SSH access in the pi (usually on by default)
+ Set up Ethernet _static IP_ (connect to your local network)
PC <-> Rpi You know both IP addresses.
PC connects to the pi using PUTTY with the static IP.
auto eth0
allow-hotplug eth0
iface eth0 inet static
address 192.168.127.1
netmask 255.255.255.0
+ Add "useDNS no" to the /etc/ssh/sshd_config file fixes slow login attempts.
Restart interfaces!
sudo service networking restart
====== WIFI =====
To configure wireless open the file
/etc/wpa_supplicant/wpa_supplicant.conf
file and add the settings for your network.
sudo ifdown wlan0
sudo ifup wlan0
Set up wireless
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="Aperture.Guests"
psk="123123123"
}
set default internet
iface default inet dhcp
===== /etc/network/interfaces =====
auto lo
iface lo inet loopback
auto eth0
allow-hotplug eth0
iface eth0 inet static
address 192.168.127.1
netmask 255.255.255.0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
===== SET UP DHCP SERVER ON THE PI
Putty to the pi and
sudo apt-get update
sudo apt-get install dnsmasq
cd /etc
sudo mv dnsmasq.conf dnsmasq.default
sudo nano dnsmasq.conf
interface=eth0
dhcp-range=192.168.127.11,192.168.127.254,255.255.255.0,12h
sudo service dnsmasq restart
MORE STUFF::
http://www.glennklockwood.com/sa/rpi-wifi-bridge.php
==== Enable I2C and install i2c utilities ====
==== JAVA SETUP ====
Download the JDK8 for ARM processors, install on the pi
Download the DeviceIO and install on the pi
DIO POLICY GPIO+i2C
grant {
permission jdk.dio.gpio.GPIOPinPermission "*:*";
permission jdk.dio.DeviceMgmtPermission "*:*", "open";
permission jdk.dio.i2cbus.I2CPermission "*:*";
};
==== GrovePi and python ====
CREATE BACKUP IMG
https://www.raspberrypi.org/forums/viewtopic.php?f=26&t=5947&start=25
http://www.richardsramblings.com/2013/02/minimalist-raspberry-pi-server-image/
Free Space
df -B1
Minimalist image::
Remove the GUI Modules
sudo apt-get purge xserver.* x11.* xarchiver xauth xkb-data console-setup xinit lightdm lxde.* python-tk python3-tk scratch gtk.* libgtk.* openbox libxt.* lxpanel gnome.* libqt.* libxcb.* libxfont.* lxmenu.* gvfs.* xdg-.* desktop.* tcl.* shared-mime-info penguinspuzzle omxplayer gsfonts
sudo apt-get --yes autoremove
sudo apt-get upgrade
Disable Memory Swapping
sudo swapoff -a
sudo rm /var/swap
Prepare for Final Imaging
sudo rm -f /var/cache/apt/*cache.bin
sudo apt-get --yes autoclean
sudo apt-get --yes clean
sudo find / -type f -name "*-old" |xargs sudo rm -rf
sudo rm -rf /var/backups/* /var/lib/apt/lists/* ~/.bash_history
find /var/log/ -type f |xargs sudo rm -rf
sudo cp /dev/null /etc/resolv.conf
dd if=/dev/mmcblk0 of=/home/YOUR_USERNAME/Desktop/backup.img bs=1M count=2048