1. 材料和环境ubuntu
树莓派Pi2, microSD卡(大于等于4G), 网线网络
官网下载: 系统镜像 Raspbian Jessie (https://downloads.raspberrypi.org/raspbian_latest 网速较慢的话, 建议用uget软件下载)ssh
这里使用的本地PC系统: ubuntu 14oop
2. 系统镜像安装spa
插入SD卡, 在ubuntu系统中, 右键镜像, 使用磁盘映像挂载器打开. 选择SD--->选择raspbian系统映像文件--->选择从映像中恢复.blog
3. 系统配置get
SD卡系统写入完毕后, 从新拔插SD卡.class
使用vi或者nano 修改/etc/network/interfaces中的内容为: (目的在于给有线以太网口配置静态的IP地址).test
auto lo iface lo inet loopback auto eth0 allow-hotplug eth0 #iface eth0 inet manual iface eth0 inet static address 10.10.1.111 # 设定的静态IP地址 netmask 255.255.255.0 # 网络掩码
gateway 10.10.1.1 auto wlan0 allow-hotplug wlan0 iface wlan0 inet manual wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf auto wlan1 allow-hotplug wlan1 iface wlan1 inet manual wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
配置PC机的IP地址为同一个网段的其余地址. 软件
插好SD卡, 网线接PC和Pi, 链接电源线.
经过 ssh pi@10.10.1.111 密码:raspberry 链接进入pi.
sudo raspi-config 配置扩张磁盘.
修改国内源:
deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi
deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi
deb http://mirrors.neusoft.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi
deb-src http://mirrors.neusoft.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi
deb http://mirrors.ustc.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi
deb-src http://mirrors.ustc.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi
其余源参考:http://wangleisd.cn/raspbian-ruan-jian-yuan/