1.1 OS X下通过下面的命令能够把镜像写入SD
$ unzip 2013-02-09-wheezy-raspbian.zip
$ df -h
$ sudo diskutil unmount /dev/rdisk1s1
$ sudo dd bs=1m if=2013-02-09-wheezy-raspbian.img of=/dev/rdisk1
$ sudo diskutil eject /dev/rdisk1
更新系统,由于基于debian,可以通过下面的命令更新升级
$ sudo apt-get update
$ sudo apt-get upgrade
升级内核
$ sudo apt-get install git-core
$ sudo wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update && sudo chmod +x /usr/bin/rpi-update
$ sudo rpi-update
1.2 无线网卡配置</h3>
一同购买的无线网卡是EDUP EP-N8508GS黄金版,这个网卡有个小问题,就是当pi启动着的时候插入会重启。
$ sudo vim /etc/network/interfaces
删除原来wlan0的配置,当然上面会有lo有线的配置,不用管
allow-hotplug wlan0
auto wlan0
iface wlan0 inet dhcp
wpa-ssid YOUR_SSID
wpa-psk YOUR_PASSWORD
$ sudo ifdown wlan0
$ sudo ifup wlan0
配置ssh自动登录
$ brew install ssh-copy-id
$ ssh-copy-id pi@192.168.1.103
pi@192.168.1.103's password:
Now try logging into the machine, with "ssh 'pi@192.168.1.103'", and check in:
~/.ssh/authorized_keys
to make sure we haven't added extra keys that you weren't expecting.
1.3 配置vncserver
参考:http://elinux.org/RPi_VNC_Server
刚好手上有一Nexus 7平板,可以通过Android连接vnc
$ sudo apt-get install tightvncserver
$ vncpasswd
$ vncserver :0 -geometry 1280x720 -depth 24
然后android安装android-vnc-viewer,通过简单的配置就能够连接上了,不过屏幕实在是小了点,玩一下还行,真正使用我觉得SSH会更好一些。
https://play.google.com/store/apps/details?id=android.androidVNC
1.4 修改swap分区大小
$ sudo vim /etc/dphys-swapfile
CONF_SWAPSIZE=1024
$ sudo dphys-swapfile setup
$ sudo dphys-swapfile swapon
$ free -m
1.5 安装golang
$ export GOARM=5
$ mkdir repos && cd repos
$ hg clone -u release http://code.google.com/p/go
$ cd go/src
$ ./make.bash #只编译,不进行测试,如果测试会无法通过
$ vim ~/.zshrc
export GOARM=5
export GOROOT=/home/pi/repos/go
export GOPATH=/home/pi/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
1.6 安装zsh
$ sudo apt-get install zsh
$ curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
$ chsh -s /bin/zsh
1.7 安装nodejs
$ axel -n 10 http://nodejs.org/dist/v0.10.4/node-v0.10.4.tar.gz
$ tar -zxvf node-v0.10.4.tar.gz
$ cd node-v0.10.4
$ ./configure
$ make
$ sudo make install
$ node --version
$ npm version
1.8 挂载树莓派的某个文件夹到本地
安装osxfuse和sshfs: "http://osxfuse.github.io/":http://osxfuse.github.io/
$ sshfs pi@192.168.1.103:/var/www www
1.9 使用raspberrypi.local访问树莓派
$ sudo apt-get install avahi-daemon
$ ssh pi@raspberrypi.local
</section>
很不错的手册:http://elinux.org/RPi_Tutorials