參考網站:
Download Arch Linux Raspberry Pi WiFi Access Point Image – Hayden James
下載網站:
https://sourceforge.net/projects/archwipi/files/latest/download
預設登入帳號及密碼:root / archwipi
請更改密碼
# passwd
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
[@more@]
更換成台灣的 Server
# sed -i ‘s/^Server/#Server/’ /etc/pacman.d/mirrorlist
# sed -i ’53s/# Server/Server/g’ /etc/pacman.d/mirrorlist
更新套件庫
# pacman -Syy
:: Synchronizing package databases…
core 159.0 KiB 3.11M/s 00:00 [######################################] 100%
extra 2.2 MiB 4.62M/s 00:00 [######################################] 100%
community 2.4 MiB 5.11M/s 00:00 [######################################] 100%
alarm 29.0 KiB 14.1M/s 00:00 [######################################] 100%
aur 61.7 KiB 15.1M/s 00:00 [######################################] 100%
安裝所需套件
# pacman -S pssh vim mlocate dnsutils
設定時區
# date
Sun Sep 28 09:13:30 MDT 2014
# ls -l /etc/localtime
lrwxrwxrwx 1 root root 34 Aug 13 2013 /etc/localtime -> /usr/share/zoneinfo/America/Denver
刪除舊有設定
# rm -rf /etc/localtime
連結到 Asis/Taipei
# ln -s /usr/share/zoneinfo/Asia/Taipei /etc/localtime
或
# timedatectl set-timezone Asia/Taipei
# date
Sun Sep 28 23:16:19 CST 2014
設定中文化環境,加入 en_US.UTF-8 和 zh-TW.UTF-8
# sed -i ‘s/#en_US.UTF-8/en_US.UTF-8/’ /etc/locale.gen
# sed -i ‘s/#zh_TW.UTF-8/zh_TW.UTF-8/’ /etc/locale.gen
產生 locale.gen 內指定的語系
# locale-gen
Generating locales…
en_US.UTF-8
zh_TW.UTF-8
Generation complete.
設定預設語系
# echo ‘LANG=”en_US.UTF-8″‘ > /etc/locale.conf
檢視設定
# grep -v ^# /etc/locale.gen
en_US.UTF-8 UTF-8
zh_TW.UTF-8 UTF-8
更新已安裝程式
# pacman -Syu
超頻
# vim /boot/config.txt
#Custom overclocking: http://haydenjames.io/raspberry-pi-safe-overclocking-settings/
##Overclock – Option 1: Low freq minimum & no over voltage (keeps Pi cool 24/7!)
arm_freq=800
arm_freq_min=600
core_freq=300
sdram_freq=500
boot_delay=0
disable_splash=1
##Overclock Option – 2: High freq maximums & over voltage (usually runs under 60C)
#arm_freq=1000
#core_freq=500
#sdram_freq=500
#over_voltage=6
#boot_delay=0
#disable_splash=1
##The lowest gpu_mem setting of 16MB (NoGUI)
gpu_mem=16
改成
#Custom overclocking: http://haydenjames.io/raspberry-pi-safe-overclocking-settings/
##Overclock – Option 1: Low freq minimum & no over voltage (keeps Pi cool 24/7!)
#arm_freq=800
#arm_freq_min=600
#core_freq=300
#sdram_freq=500
#boot_delay=0
#disable_splash=1
##Overclock Option – 2: High freq maximums & over voltage (usually runs under 60C)
arm_freq=1000
core_freq=500
sdram_freq=500
over_voltage=6
boot_delay=0
disable_splash=1
##The lowest gpu_mem setting of 16MB (NoGUI)
gpu_mem=16
重新啟動電腦
# systemctl reboot
無線網路 SSID及密碼:ArchWiPi / 1010101010
更改無線網路密碼
# vim /usr/lib/systemd/system/create_ap.service
[Unit]
Description=Create AP Service
[Service]
Type=simple
ExecStart=/usr/bin/bash create_ap wlan0 eth0 ArchWiPi 1010101010
KillSignal=SIGINT
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
檢查 CPU 速度和溫度,可以執行
# cd /root;./bcmstat.sh
使用瀏覽器來觀看:http://192.168.12.1:8080/archwipi
(powered by Monitorix)
系統開啟的服務
# netstat -antulp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 344/monitorix-httpd
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 342/dnsmasq
tcp 0 0 192.168.12.1:53 0.0.0.0:* LISTEN 342/dnsmasq
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 119/dropbear
udp 0 0 0.0.0.0:5353 0.0.0.0:* 136/avahi-daemon: r
udp 0 0 127.0.0.1:53 0.0.0.0:* 342/dnsmasq
udp 0 0 192.168.12.1:53 0.0.0.0:* 342/dnsmasq
udp 0 0 0.0.0.0:67 0.0.0.0:* 342/dnsmasq
udp 0 0 0.0.0.0:68 0.0.0.0:* 384/dhcpcd
udp 0 0 0.0.0.0:40054 0.0.0.0:* 136/avahi-daemon: r