![](https://img.haomeiwen.com/i4463510/1e1e21c4a591f27c.gif)
1.需要准备的材料:
- 树莓派开发板(型号可根据需求进行选择)
- TF存储卡(容量大于8G,用来烧录树莓派系统)
- Micro USB接口供电的电源(5V,2A)
- 外壳(推荐金属材质,散热性能较好,有效保护主板)
2.相关资源推荐:
树莓派官方网站
树莓派官方帮助文档
系统镜像烧录工具Etcher
Awesome-Raspberry-Pi
树莓派软件源列表
官方镜像下载
3.烧录系统镜像:
- 桌面版本,上手容易,推荐安装
- 命令行版本,上手难度高,更具逼格,专业人士最爱
烧录方法:
- 格式化TF存储卡
- 使用Etcher工具按引导烧录下载好的系统镜像
4.开机前相关配置(无外接显示器和键盘):
-
开启 SSH 服务
在系统boot分区新建一个名为ssh空白文件,无需后缀名 -
WiFi 网络配置
在系统boot分区新建 wpa_supplicant.conf 文件,写入如下内容:
country=CN
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
//加密方式为WPA-PSK使用此配置
network={
ssid="wifi-name" //wifi名字
psk="wifi-passwd" //wifi密码
key_mgmt=WPA-PSK //wifi加密方式
priority=1 //wifi优先级 数字越大 优先级越高
}
//加密方式为WPA-EAP使用此配置
network={
ssid="wifi-name"
key_mgmt=WPA-EAP
eap=PEAP
identity="identity-acount"
password="identity-passwd"
#ca_cert="/etc/cert/ca.pem"
#phase1="peaplabel=1"
phase2="auth=MSCHAPV2"
priority=2
}
5.开机:
- 将烧录好系统的TF存储卡插入树莓派
- 接通电源(符合供电需求的移动电源或充电器均可)
5.软件源修改:
由于树莓派官方软件源连接不稳定,速度慢,建议修改为国内软件源
软件源推荐:
//RASPBIAN STRETCH 版本适用
中国科学技术大学
deb http://mirrors.ustc.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi
清华大学
deb https://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi
阿里云
deb http://mirrors.aliyun.com/raspbian/raspbian/ stretch main contrib non-free rpi
修改方法:
- 编辑/etc/apt/sources.list文件:
$ sudo nano /etc/apt/sources.list
2.将文件内容修改为(具体软件源自行选择):
deb http://mirrors.aliyun.com/raspbian/raspbian/ stretch main contrib non-free rpi
deb-src http://mirrors.aliyun.com/raspbian/raspbian/ stretch main contrib non-free rpi
- 保存退出后执行:
sudo apt-get update
6.自动加载外置硬盘:
- 添加ntfs文件系统支持(ntfs-3g):
sudo apt-get install ntfs-3g
sudo reboot //重新启动后生效
- 创建挂载点:
sudo mkdir /home/pi/ //挂载目录
sudo chmod 777 /home/pi/ //根据需求添加读写权限
网友评论