4

树莓派系统安装

 1 year ago
source link: https://zgh551.github.io/2022/12/26/%E6%A0%91%E8%8E%93%E6%B4%BE%E7%B3%BB%E7%BB%9F%E5%AE%89%E8%A3%85/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

本文讲述了树莓派系统的安装过程,并描述系统环境的配置,让其可以满足基本开发需求。

高达模型

高达模型

硬件环境准备

卡片计算机

本文演示所用的计算机是 Raspberry Pi 3 Model B,其参数如下:

  • Quad Core 1.2GHz Broadcom BCM2837 64bit CPU
  • 1GB RAM
  • BCM43438 wireless LAN and Bluetooth Low Energy (BLE) on board
  • 100 Base Ethernet
  • 40-pin extended GPIO
  • 4 USB 2 ports
  • 4 Pole stereo output and composite video port
  • Full size HDMI
  • CSI camera port for connecting a Raspberry Pi camera
  • DSI display port for connecting a Raspberry Pi touchscreen display
  • Micro SD port for loading your operating system and storing data
  • Upgraded switched Micro USB power source up to 2.5A

电源适配器

根据官方推荐参数,请选用输出电流可达 2.5A 的电源适配器,如果电源适配的输出功率不够,可能会导致系统不稳定的情况。例如在使用 ssh 连接卡片计算机时,如果计算机负载过高,会出现 ssh 连接断开的的情况。

推荐选用 SD 卡的容量至少 32GB,该容量可以满足大部分场景需求。

软件环境准备

首先从 树莓派官网 下载最新的系统镜像,本文演示的系统镜像信息如下:

  • Raspberry Pi OS Lite

  • Release date: September 22nd 2022

  • System: 64-bit

  • Kernel version: 5.15

  • Debian version: 11 (bullseye)

  • Size: 289MB:72c773781a0a57160eb3fa8bb2a927642fe60c3af62bc980827057bcecb7b98b

镜像烧录工具下载

从树莓派官网下载 Raspberry Pi Imager 工具,进行系统镜像的烧录。

点击右下角的设置按钮,开启 SSH 功能并创建用户名和密码,如果希望通过 wifi 连接,可以配置 wifi 热点名和密码。

更新镜像源

参考 清华树莓派镜像站 配置系统镜像源。

备份镜像源文件,通过如下命令:

cp /etc/apt/sources.list /tmp/sources.list.backup

通过下面的指令替换原文件的内容并更新到系统镜像源。

sudo sed -e 's/http:\/\/deb.debian.org/https:\/\/mirrors.tuna.tsinghua.edu.cn/;s/http:\/\/security.debian.org/https:\/\/mirrors.tuna.tsinghua.edu.cn/' /tmp/sources.list.backup > /etc/apt/sources.list

同理,执行下述命令,替换为清华镜像源:

cp /etc/apt/sources.list.d/raspi.list /tmp/raspi.list.backup
sudo sed -e 's/http:\/\/archive.raspberrypi.org\/debian/https:\/\/mirrors.tuna.tsinghua.edu.cn\/raspberrypi/' /tmp/raspi.list.backup > /etc/apt/sources.list.d/raspi.list

执行下述命令,更新系统镜像源:

sudo apt-get update --fix-missing
sudo apt-get upgrade -y

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK