pi@raspberrypi:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 1.3G 931M 262M 79% /
devtmpfs 214M 0 214M 0% /dev
tmpfs 218M 0 218M 0% /dev/shm
tmpfs 218M 4.4M 213M 2% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 218M 0 218M 0% /sys/fs/cgroup
/dev/mmcblk0p1 60M 20M 41M 34% /boot
組態設定:
pi@raspberrypi:~$ sudo raspi-config
1 Expnad Filesystem ps. have to reboot system to enable
5->I1 Select en_US.UTF-8, zh_TW BIG5 and UTF-8
9->A3 Config GPU setting
8 Overclock Config CPU workload
Finish to reboot system
┌─────────┤ Raspberry Pi Software Configuration Tool (raspi-config) ├───────│──┐ │
│ 1 Expand Filesystem Ensures that all of the SD card s │
│ 2 Change User Password Change password for the default u │
│ 3 Boot Options Choose whether to boot into a des │
│ 4 Wait for Network at Boot Choose whether to wait for networ │
│ 5 Internationalisation Options Set up language and regional sett │
│ 6 Enable Camera Enable this Pi to work with the R │
│ 7 Add to Rastrack Add this Pi to the online Raspber │
│ 8 Overclock Configure overclocking for your P │
│ 9 Advanced Options Configure advanced settings │
│ 0 About raspi-config Information about this configurat │
│ │
│ │
│ <Select> <Finish> │
│ │
└──────────────────────────────────────────────────────────────────────────────┘
┌──────────────────────────────────────────────────────────┐
│ Chose overclock preset │
│ │
│ None 700MHz ARM, 250MHz core, 400MHz SDRAM, 0 overvolt │
│ Modest 800MHz ARM, 250MHz core, 400MHz SDRAM, 0 overvolt │
│ Medium 900MHz ARM, 250MHz core, 450MHz SDRAM, 2 overvolt │
│ High 950MHz ARM, 250MHz core, 450MHz SDRAM, 6 overvolt │
│ Turbo 1000MHz ARM, 500MHz core, 600MHz SDRAM, 6 overvolt│
│ Pi2 1000MHz ARM, 500MHz core, 500MHz SDRAM, 2 overvolt│
│ Root partition has been resized. │
│ The filesystem will be enlarged upon the next reboot
Package configuration
┌──────────────────────────┤ Configuring locales ├──────────────────────────│ Many packages in Debian use locales to display text in the correct │
│ language for the user. You can choose a default locale for the system │
│ from the generated locales. │
│ │
│ This will select the default language for the entire system. If this │
│ system is a multi-user system where not all users are able to speak the │ default language, they will experience difficulties. │
│ │
│ Default locale for the system environment: │
│ │
│ None │
│ C.UTF-8 │
│ en_GB.UTF-8 │
│ en_US.UTF-8 │
│ zh_TW │
│ zh_TW.UTF-8 │
│ │
│ │
│ <Ok> <Cancel>
How much memory should the GPU have? e.g. 16/32/64/128/256
Default = 0 用不到
┌──────────────────────────────────────────────────────────┐
│ Chose overclock preset │
│ │
│ None 700MHz ARM, 250MHz core, 400MHz SDRAM, 0 overvolt │
│ Modest 800MHz ARM, 250MHz core, 400MHz SDRAM, 0 overvolt │
│ Medium 900MHz ARM, 250MHz core, 450MHz SDRAM, 2 overvolt │
│ High 950MHz ARM, 250MHz core, 450MHz SDRAM, 6 overvolt │
│ Turbo 1000MHz ARM, 500MHz core, 600MHz SDRAM, 6 overvolt│
│ Pi2 1000MHz ARM, 500MHz core, 500MHz SDRAM, 2 overvolt│
CPU Overclock as High
pi@raspberrypi:~$ df -h
檔案系統 容量 已用 可用 已用% 掛載點
/dev/root 3.6G 933M 2.5G 27% /
devtmpfs 214M 0 214M 0% /dev
tmpfs 218M 0 218M 0% /dev/shm
tmpfs 218M 4.4M 213M 2% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 218M 0 218M 0% /sys/fs/cgroup
/dev/mmcblk0p1 60M 20M 41M 34% /boot
pi@raspberrypi:~$
Config Networking Setting
/etc/hostname
root@raspberrypi:/etc# more hostname
f1
/etc/hosts
root@raspberrypi:/etc# more hosts
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
127.0.1.1 f1
172.20.110.150 f1
172.20.110.151 f2
172.20.110.152 f3
172.20.110.153 f4
/etc/network/interfaces
auto lo
iface lo inet loopback
#iface eth0 inet manual
auto eth0
iface eth0 inet static
address 172.20.110.150
netmask 255.255.0.0
gateway 172.20.110.254
dns-nameservers 168.95.1.1
#
allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
allow-hotplug wlan1
iface wlan1 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
/etc/resolv.conf
# Generated by resolvconf
nameserver 172.20.110.254
nameserver 168.95.1.1
加入無線AP基地台設定 for 1st machine only
$ sudo cat /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
改ssid
psk
network={
ssid="LOGTEAM"
psk="log28353953"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
auth_alg=OPEN
Enable ip forward 功能
$ sudo nano /etc/rc.local
加2行
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE