PHP菜鸟博客_共同学习分享PHP技术心得【PHP爱好者】
树莓派3b+刷debian12系统
2025-1-14 菜鸟站长


1.准备debian12的镜像(https://raspi.debian.net/tested-images/),(我的树莓派是3b+,看清楚自己的型号哦),烧录工具rufus.exe,内存卡读卡器,树莓派3b+(hdmi+显示器)



1.png



2.png



2.烧录,把内存卡插入树莓派,通电启动,hdmi连接显示器,然后登录用户名root,默认密码是空(直接回车),root不允许远程登录于是我们新建一个用户 useradd wl ,passwd  wl  (密码设置成wl905507 )



3.jpg


3.查询树莓派的ip地址(去路由器后台),然后使用ssh工具链接过去,使用wl用户,然后我们切换成root用户。su  -  


3.修改debian12的源 ,先把权限改成777,然后直接替换下这个源文件,(为啥要改成777,因为ssh虽然切换成root了,但是文件上传那边还是用户wl,所以需要修改权限,直接777就行了)







源文件内容:






# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
# deb-src 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-src 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-src 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
# deb-src https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware










3.png



4.png



4.安装宝塔等软件


先安装wget命令 , apt update  ,apt install wget,在执行安装宝塔的命令就可以了。(因为安装宝塔的时候,提示没有wget命令,所以先安装这个命令在安装宝塔,当然前提必须是先换了源)
发表评论:
昵称

邮件地址 (选填)

个人主页 (选填)

内容