必要的准备

  • 一个 4 G 或以上的 U 盘

下载 debian 镜像

debian 提供了联网与离线的两种安装方式,为了避免网络原因引起的故障,使用离线版的安装镜像

镜像种子文件:

https://oss.kicey.site/public/link/debian-11.3.0-amd64-DVD-1.iso.torrent

使用 rufus 制作 u 盘镜像

rufus 官网可能存在访问问题,可以直接使用下面的可执行文件(2022.7.7 从官网获取)

https://oss.kicey.site/public/bin/rufus-3.19.exe

rufus 的配置比较简单。

选择插入的 U 盘,以及上一步下载的镜像文件即可,其余保持默认配置(rufus可能下载一些文件,请允许)。

安装 debian

插入 u 盘,开机时按 F7(多数机器是这个键) 进入 boot 选择,选择刚才制作镜像的 u 盘。根据引导安装。

在 Select And Install software 处的几个选项中,除了以下3个

  • SSH Server
  • Web Server
  • Common Utilities

其余都是桌面 UI,如果作为服务器使用就取消勾选。

取消休眠

debian 默认开启了休眠,如果是作为服务器使用需要取消休眠。

使用以下几个命令:

# 查看休眠状态
systemctl status sleep.target
# 禁止休眠
systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
# 恢复休眠
systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target