Debian 12快速安装图解

文章目录

Debian 12安装图解

Debian选择CD安装非常慢,本次安装选择DVD离线安装。

下载 https://www.debian.org/CD/torrent-cd/

创建虚拟机

安装系统

选择语言,

选择地区

配置键盘


设置root密码

除了root用户外,还要设置一个非root用户,填写自己设置的用户名与密码

配置磁盘

因为这里是虚拟机安装,所有文件一个分区就行。大佬可选自定义。

确定

选YES

选NO

这一步是关键,选NO。

选NO。

安装桌面,看自己需求。

如果不要桌面,仅钩选后面两项。

GRUB安装,选择Yes

安装位置

完成了,移除DVD。

登录并用光盘离线安装sudo、curl

bash 复制代码
# 测试命令
$ curl
-bash: curl: command not found
# 切换root
$su

连接光盘

一般会自动挂载,连接后,直接apt install curl

bash 复制代码
ls -la /dev | grep cdrom
mkdir /mnt/cdrom
mount /dev/cdrom /mnt/cdrom

安装

bash 复制代码
apt install sudo
apt install curl

解决Linux下sudo更改文件权限报错

bash 复制代码
# 切换root用户
su
# 添加可写权限
chmod u+w /etc/sudoers
vi /etc/sudoers

找到root ALL=(ALL:ALL) ALL,在下面添加一行,wq!保存退出。

输入chmod u-w /etc/sudoers撤消权限。

使用完毕以后,要记得卸载光盘。在命令行输入:umount /mnt/cdrom。然后再进入/mnt/cdrom目录就看不到光盘的内容了,说明已经成功卸载。

保存快照

为方便恢复系统,可以选择保存快照,虚拟机列表,右键,拍摄快照。

debain添加在线源(配置清华源)

清华源

一般情况下,将 /etc/apt/sources.list 文件中 Debian 默认的源地址 http://deb.debian.org/ 替换为镜像地址即可。

Debian Buster 以上版本默认支持 HTTPS 源。如果遇到无法拉取 HTTPS 源的情况,请先使用 HTTP 源并安装:

shell 复制代码
sudo apt install apt-transport-https ca-certificates

如下

bash 复制代码
#deb cdrom:[Debian GNU/Linux 12.1.0 _Bookworm_ - Official amd64 DVD Binary-1 with firmware 2023]/ bookworm main non-free-firmware

# 默认注释了源码镜像以提高 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://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware
# # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security 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

参考

解决Linux下sudo更改文件权限报错
Debian 12安装教程:轻松搭建稳定可靠的Linux系统

相关推荐
Nimsolax28 分钟前
Linux网络Socket编程TCP
linux·网络·tcp/ip
SUPER52664 小时前
FastApi项目启动失败 got an unexpected keyword argument ‘loop_factory‘
java·服务器·前端
一只小bit5 小时前
MySQL 库的操作:从创建配置到备份恢复
服务器·数据库·mysql·oracle
利刃大大5 小时前
【高并发服务器】二、时间轮定时器设计与实现
服务器·项目·cpp·高并发服务器
青草地溪水旁7 小时前
linux信号(14)——SIGALRM:从“手机闹钟”看SIGALRM:进程的非阻塞定时神器
linux·信号机制
心灵宝贝7 小时前
libopenssl-1_0_0-devel-1.0.2p RPM 包安装教程(openSUSE/SLES x86_64)
linux·服务器·数据库
BullSmall8 小时前
linux zgrep命令介绍
linux·运维
emma羊羊9 小时前
【文件读写】图片木马
linux·运维·服务器·网络安全·靶场
wdfk_prog10 小时前
闹钟定时器(Alarm Timer)初始化:构建可挂起的定时器基础框架
java·linux·数据库
2301_8184115510 小时前
Ubuntu之apt更新源
linux·运维·ubuntu