当前位置: 首页 > article >正文

试用Debian12.7和Ubuntu24.4小札

Debian GNU/Linux 12 (bookworm)和Ubuntu 24.04.1 LTS是现阶段(2024年9月26日)两个发行版的最新版本。Ubuntu Server版本默认就不带桌面(ubuntu-24.04-live-server-amd64.iso),这个默认就是最小化安装(安装包量:500左右);Debian 虽带桌面了(debian-12.7.0-amd64-DVD-1.iso),但是在安装选择安装包阶段,可以选择是否要安装桌面;最简安装,安装包量不到400

默认未安装启用防火墙

如果"最小化安装"或者"去桌面环境安装",这俩发行版默认是不带防火墙的。需要安装完毕后,登录系统选装(ufw、firewalld),个人使用firewalld习惯了,所以选装了firewalld:

1、先更新可用包列表,然后将系统更新到最新

 sudo apt update
 sudo apt upgrade

注:

  • update - update list of available packages

  • upgrade - upgrade the system by installing/upgrading packages

  • full-upgrade - upgrade the system by removing/installing/upgrading packages

2、安装firewalld防火墙

 sudo apt -y install firewalld

默认没安装旧的一套网络管理工具

例如:ifconfig、netstat、arp、route等,需要手动安装才会有。

 sudo apt -y install net-tools

默认未安装NetworkManager网络管理器

习惯了使用nmcli、nmtui命令管理和配置IP地址等信息,没有安装感觉就不习惯了。

Debian12*还好,可以使用老方法配置

1、通过/etc/network/interfaces配置IP等

 ~# cat /etc/network/interfaces
 # This file describes the network interfaces available on your system
 # and how to activate them. For more information, see interfaces(5).
 ​
 source /etc/network/interfaces.d/*
 ​
 # The loopback network interface
 auto lo
 iface lo inet loopback
 ​
 # The primary network interface
 allow-hotplug ens192
 iface ens192 inet static
         address 192.168.xx.217/24
         gateway 192.168.xx.1
         # dns-* options are implemented by the resolvconf package, if installed
         dns-nameservers 192.168.xx.1 223.5.5.5 8.8.8.8

 2、重启networking服务

 ~# systemctl restart networking
 ~# systemctl status networking
 * networking.service - Raise network interfaces
      Loaded: loaded (/lib/systemd/system/networking.service; enabled; preset: enabled)
      Active: active (exited) since Thu 2024-09-26 16:33:41 CST; 1h 43min ago
        Docs: man:interfaces(5)
    Main PID: 1053 (code=exited, status=0/SUCCESS)
         CPU: 197ms
 ​
 Sep 26 16:33:41 debian127-xx-215 systemd[1]: Starting networking.service -
 Raise network interfaces...
 Sep 26 16:33:41 debian127-xx-215 systemd[1]: Finished networking.service -
 Raise network interfaces.
Ubuntu Server 24.04就略有不同(引入了netplan 工具)

1、修改配置文件/etc/netplan/50-cloud-init.yaml

 ~# cat /etc/netplan/50-cloud-init.yaml 
 # This file is generated from information provided by the datasource.  Changes
 # to it will not persist across an instance reboot.  To disable cloud-init's
 # network configuration capabilities, write a file
 # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
 # network: {config: disabled}
 network:
     ethernets:
         ens192:
             addresses:
             - 192.168.xx.152/24
             nameservers:
                 addresses:
                 - 223.5.5.5
                 search: []
             routes:
             -   to: default
                 via: 192.168.xx.1
     version: 2

2、执行sudo netplan apply应用;

默认Debian12.7的最简安装没有装sudo

~# apt -y install sudo

配置Debian12.7的网络镜像站

如果安装时,没有配置,那么Debian默认不会生成可用的sources.list文件。需要手动配置一下:一般我喜欢使用阿里镜像站,但是在其debian镜像站配置帮助页面,只有11.*及一下版本的,没有12.*的。

1、拷贝或者使用11.*的sources.list文件

2、执行如下命令进行替换,以适用12.*

 sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list
 sed -i 's/non-free contrib/non-free non-free-firmware/g' /etc/apt/sources.list

 3、执行apt update验证


http://www.kler.cn/news/322666.html

相关文章:

  • 计算机网络--HTTP协议
  • 酒店智能门锁SDK接口pro[V10] 对接酒店收银-模块封装C#-SAAS本地化-未来之窗行业应用跨平台架构
  • C++ 类与对象(上)
  • 关于Mysql数据库的日常维护,包括配置、优化、备份、故障处理等工作的50道运维面试题
  • 关于使用/bin/sh -c 用于Dockerfile的Entrypoint的问题
  • 【第十五章:Sentosa_DSML社区版-机器学习之关联规则】
  • 高翔【自动驾驶与机器人中的SLAM技术】学习笔记(十)高翔书中的细节:参考链接;卫星导航;ESKF
  • Redis篇(数据类型)
  • 桥接模式
  • 【区块链快速概览】了解区块链的基本原理、共识机制(如PoW, PoS)、加密技术基础。
  • uWsgi找不到新安装的python模块问题【亲测好用】
  • 通过 Xshell 无法连接到 Ubuntu
  • HarmonyOS鸿蒙开发实战( Beta5.0)Web组件预览PDF文件实现案例
  • 简历信息提取系统源码分享
  • Postman如何测试WebSocket接口!
  • 企业内训|大模型/智算行业发展机会深度剖析-某数据中心厂商
  • 设备管理系统-TPM(PC+APP/PDA全流程)高保真Axure原型 源文件分享
  • keepalived+nginx实现高可用的案例详解(主主模式)
  • 以题为例浅谈反序列化漏洞
  • 点餐小程序实战教程12菜品展示
  • 记一次 RabbitMQ 消费者莫名消失问题的排查
  • 【洛谷】AT_abc178_d [ABC178D] Redistribution 的题解
  • 摒弃“流量思维”,以精准流量驱动企业发展——基于开源 AI 智能名片、链动 2+1 模式及 O2O 商城小程序的思考
  • 【JavaScript】尾递归优化
  • en造数据结构与算法C# 之 二叉排序树的删除
  • 哪个快?用300万个图斑测试ArcGIS Pro的成对叠加与经典叠加
  • Spring Task快速入门
  • Autosar学习----AUTOSAR_SWS_BSWGeneral(七)
  • 【GUI设计】基于Matlab的图像特征提取GUI系统(9),matlab实现
  • Win10 QT 配置Android开发环境-jdk/sdk/gradle