前言
久仰树莓派大名,从网上订购的树莓派5代,第一天下单,第二天就到了,迫不及待开箱把玩。
我买的4G基础套餐,多花10元,升级64G存储卡(TF卡)。
组装
组装不太顺利,始终找不到主板上面风扇的插口,在淘宝上面问客服,对方也是一问三不知。
bilibili找教程,经过一番摸索,才发现插孔被堵住了,需要手工打开。
初始化
解决桌面操作时鼠标移动延迟
1
2# 修改/boot/cmdline.txt, 最后加入空格, 再增加如下代码段
usbhid.mousepoll=0修改软件镜像源
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18# 查找镜像源地址信息,浏览器打开url.
https://mirrors.tuna.tsinghua.edu.cn/help/raspbian/
# 按照页面指引,执行uname -m, 查看系统架构
aarch64
# 再点击进入
https://mirrors.tuna.tsinghua.edu.cn/help/debian/
# 按照页面指引,更新 /etc/apt/sources.list,如下:
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
deb https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
# 备份/etc/apt/sources.list.d/raspi.list, 清空后写入:
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main
# 更新升级软件源
apt update && apt upgrade安装系统日志
1
sudo apt install syslog-ng
安装docker和docker-compose
1
2
3
4
5
6
7
8
9# install docker
https://phoenixnap.com/kb/docker-on-raspberry-pi#:~:text=Docker%20Raspberry%20Pi%20Install%201%20Update%20and%20upgrade,up%20by%20running%20a%20%22hello-world%22%20container.%20See%20More.
# install docker-compose
cd ~/python3/
python3 -m venv venv
source ./venv/source/activate
pip3 install docker-compose安装快捷命令
1
2
3
4
5
6
7
8alias ll='ls -alt'
# 桌面加锁
alias lock='/usr/bin/dm-tool lock'
alias tailf='tail -f'
# 查看内存消耗前10位的进程
alias mem10='sudo ps -aux | sort -k4nr | head -10'
# 查看cpu消耗前10位的进程
alias cpu10='ps aux | sort -k3nr | head -n 10'软件优化
1
2
3# 重装vim
apt-get remove vim-common
apt-get install vim