树莓派Pi2 使用入门

1. 材料和环境

  树莓派Pi2, microSD卡(大于等于4G), 网线

  官网下载: 系统镜像 Raspbian Jessie (https://downloads.raspberrypi.org/raspbian_latest 网速较慢的话, 建议用uget软件下载)

  这里使用的本地PC系统: ubuntu 14

2. 系统镜像安装

      插入SD卡, 在ubuntu系统中, 右键镜像, 使用磁盘映像挂载器打开. 选择SD--->选择raspbian系统映像文件--->选择从映像中恢复.

3. 系统配置

  SD卡系统写入完毕后, 重新拔插SD卡.

  使用vi或者nano 修改/etc/network/interfaces中的内容为:  (目的在于给有线以太网口配置静态的IP地址).

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/

原文地址:https://www.cnblogs.com/zhangjiankun/p/4857177.html