当前位置:   article > 正文

debian 12 Install

debian 12 Install

debian 前言

Debian是一个基于Linux内核的自由和开放源代码操作系统,由全球志愿者组成的Debian项目维护和开发。该项目始于1993年,由Ian Murdock发起,旨在创建一个完整的、基于Linux的自由软件操作系统。

debian download

  • debian 百度网盘离线
  • PXE Server 自动化部署debian参考
debiandebian 历史版debian 发行版debian 安装debian preseed.cfg自动化编排

Debian 全球镜像站

downloaddownload参考参考参考download

开始安装debian

语言选择

时区设置

选择键盘模式:American English 

配置网卡,选择GO Back

手动配置IP

ip 配置 

子网掩码配置

网关配置

DNS配置

主机名称设置

设置域名:可不填写 

 root 密码配置

创建普通用户

普通用户密码配置 

时间服务器配置

磁盘分区方式选择,使用所有分区

  • Guided-use entire disk    带引导模式方式直接使用整块磁盘
  • Guided-use entire disk and set up LVM    带引导模式方式使用整块磁盘并使用LVM,LVM(Logical Volume Mananger)逻辑卷管理,可对磁盘进行弹性管理
  •  Guided-use entire disk and set up encrypted LVM    带引导模式方式使用整块磁盘并使用加密的LVM
  • Manual    完全手动模式

磁盘分区

所有的文件都位于一个分区中 

  •  All files in one partition(recommended for new users)    所有的文件都位于一个分区中(推荐新用户)
  •  Separate /home partition    单独设置home分区
  • Separate /home,/var,and /tmp partitions 单独设置home分区,var分区以及tmp分区

磁盘分区,提醒磁盘将被改变并设置LVM,选择:Yes

指定分区要使用的磁盘大小,默认使用整个磁盘的大小,默认即可

获取将要对磁盘的操作信息,选择:no

更改/分区为xfs,便于后期在线扩容

磁盘更改完成,选择yes ,格式化磁盘

开始安装系统 

是否扫描安装介质,选择:No 

是否使用网络镜像源,选择:yes

  • 国内网络不好,此处可根据自身网络情况选择,选择no,后续手动更改源即可

选择网络源 

配置包管理器

等待安装

是否参与使用系统调查(每周系统自动提交一个脚本给系统开发者),选择:No 

命令行安装

  • standard(标准工具)
  • desktop(图形化桌面)
  • gnome-desktop (Gnome 桌面)
  • xfce-desktop (XFCE 桌面)
  • kde-desktop (KDE Plasma 桌面)
  • cinnamon-desktop (Cinnamon 桌面)
  • mate-desktop (MATE 桌面)desktop)
  • lxde-desktop (LXDE 桌面)
  • web-server (web 服务器)
  • ssh-server (SSH 服务器)

安装中,等待

重启 reboot 

shell 登录查看

远程SSH 连接配置

  • 重启ssh
  1. cat >>/etc/ssh/sshd_config<<EOF
  2. # add 18
  3. PermitRootLogin yes
  4. EOF
  5. systemctl restart ssh

 更换阿里云源

  1. echo "Change the debian source"
  2. mv /etc/apt/sources.list /etc/apt/sources.list.bak
  3. cat <<'EOF'>>/etc/apt/sources.list
  4. deb https://mirrors.aliyun.com/debian/ bookworm main non-free non-free-firmware contrib
  5. deb-src https://mirrors.aliyun.com/debian/ bookworm main non-free non-free-firmware contrib
  6. deb https://mirrors.aliyun.com/debian-security/ bookworm-security main
  7. deb-src https://mirrors.aliyun.com/debian-security/ bookworm-security main
  8. deb https://mirrors.aliyun.com/debian/ bookworm-updates main non-free non-free-firmware contrib
  9. deb-src https://mirrors.aliyun.com/debian/ bookworm-updates main non-free non-free-firmware contrib
  10. deb https://mirrors.aliyun.com/debian/ bookworm-backports main non-free non-free-firmware contrib
  11. deb-src https://mirrors.aliyun.com/debian/ bookworm-backports main non-free non-free-firmware contrib
  12. EOF
  13. apt-get clean
  14. apt-get update
  15. apt install -y vim

切换sh为bash 

ln -sf bash /bin/sh

Network 配置

  1. nic_network_name=`ifconfig -s | awk 'NR>1 && !/^lo/ && !/^idrac/ && !/^br/ && !/^veth/ && !/^docker/{print $1; exit}'`
  2. IP_ADDRESS="192.168.11.69"
  3. PREFIX_mask="24"
  4. GATEWAY="192.168.11.1"
  5. DNS1="8.8.8.8"
  6. echo "delete default interfaces"
  7. rm -rf /etc/network/interfaces
  8. echo "Function interfaces"
  9. cat <<EOF>>/etc/network/interfaces
  10. source /etc/network/interfaces.d/*
  11. auto lo
  12. iface lo inet loopback
  13. allow-hotplug $nic_network_name
  14. iface $nic_network_name inet static
  15. address $IP_ADDRESS/$PREFIX_mask
  16. gateway $GATEWAY
  17. dns-nameservers $DNS1
  18. EOF
  19. echo "Restart the NIC to take effect"
  20. systemctl restart ifup@$nic_network_name

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/木道寻08/article/detail/817939
推荐阅读
相关标签
  

闽ICP备14008679号