Linux_Debian学习笔记

文章目录

  • 系统管理
    • 软件源
      • Debian11
        • debian11 ustc中国科技大学软件源
        • debian11 清华大学软件源
        • debian11 阿里云软件源
      • Debian12
        • debian12 清华大学软件源
    • 系统全局设置
      • debian12 修改静态IP地址
      • 修改语言环境成中文
    • 系统输入法
      • Debian11 fcxe 安装rime中州韵五笔输入法
  • 常用软件安装
    • Docker安装

系统管理

软件源

Debian11

debian11 ustc中国科技大学软件源
  1. 生成软件源
    # 备份软件源
    mv /etc/apt/sources.list /etc/apt/sources.list.backup.$(date "+%Y-%m-%d_%H:%M")
    cat > /etc/apt/sources.list << 'EOF'
    deb http://mirrors.ustc.edu.cn/debian stable main contrib non-free
    # deb-src http://mirrors.ustc.edu.cn/debian stable main contrib non-free
    deb http://mirrors.ustc.edu.cn/debian stable-updates main contrib non-free
    # deb-src http://mirrors.ustc.edu.cn/debian stable-updates main contrib non-free# deb http://mirrors.ustc.edu.cn/debian stable-proposed-updates main contrib non-free
    # deb-src http://mirrors.ustc.edu.cn/debian stable-proposed-updates main contrib non-free
    EOF
debian11 清华大学软件源
  1. 生成软件源
    # 备份软件源
    mv /etc/apt/sources.list /etc/apt/sources.list.backup.$(date "+%Y-%m-%d_%H:%M")
    cat > /etc/apt/sources.list << 'EOF'
    # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
    deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
    # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
    deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
    # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-freedeb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free
    # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-freedeb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free
    # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free
    EOF
    
debian11 阿里云软件源
  1. 生成软件源
    # 备份软件源
    mv /etc/apt/sources.list /etc/apt/sources.list.backup.$(date "+%Y-%m-%d_%H:%M")
    cat > /etc/apt/sources.list << 'EOF'
    deb http://mirrors.aliyun.com/debian/ bullseye main non-free contrib
    deb-src http://mirrors.aliyun.com/debian/ bullseye main non-free contrib
    deb http://mirrors.aliyun.com/debian-security/ bullseye-security main
    deb-src http://mirrors.aliyun.com/debian-security/ bullseye-security main
    deb http://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
    deb-src http://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
    deb http://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib
    deb-src http://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib
    EOF
    

Debian12

debian12 清华大学软件源
  1. 生成软件源
    # 备份软件源
    mv /etc/apt/sources.list /etc/apt/sources.list.backup.$(date "+%Y-%m-%d_%H:%M")
    cat > /etc/apt/sources.list << 'EOF'
    # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
    deb http://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
    # deb-src http://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmwaredeb http://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
    # deb-src http://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmwaredeb http://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
    # deb-src http://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware# deb http://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware
    # # deb-src http://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmwaredeb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
    # deb-src http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
    EOF
    

系统全局设置

debian12 修改静态IP地址

  1. eth0为dhcp获取ip,eth1为静态ip,使用"systemctl restart networking.service"命令生效
  2. debian12 修改静态IP地址
    # 备份配置文件
    sudo mv /etc/network/interfaces /etc/network/interfaces.backup.$(date "+%Y-%m-%d_%H:%M")
    sudo cat > /etc/network/interfaces << 'EOF'
    # 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 eth0 eth1
    iface eth0 inet dhcp
    iface eth1 inet staticaddress 10.10.10.10/24broadcast 10.10.10.255network 10.10.10.0
    EOF
    

修改语言环境成中文

  1. 修改语言环境成中文
    dpkg-reconfigure locales
    #设置成zh_CN.UTF-8后,重启
    

系统输入法

Debian11 fcxe 安装rime中州韵五笔输入法

  1. 安装rime输入法
    sudo apt -y install fcitx5-rime
    
  2. 下载安装五笔输入方案
    # 下载五笔输入法
    wget https://github.com/rime/rime-wubi/archive/refs/heads/master.zip -O rime-wubi.zip
    # 五笔拼音反查依赖pinyin-simp
    wget https://github.com/rime/rime-pinyin-simp/archive/refs/heads/master.zip -O rime-pinyin-simp.zip
    unzip rime-wubi.zip
    unzip rime-pinyin-simp.zip
    在GUI界面注销,再登录用户
    在输入法中调出中州韵输入法
    cp rime-wubi-master/wubi* ~/.local/share/fcitx5/rime/
    cp rime-pinyin-simp-master/pinyin_simp* ~/.local/share/fcitx5/rime/
    vi ~/.local/share/fcitx5/rime/build/default.yaml
    # 编辑文件,在schema_list:下增加五笔输入法
    - schema: wubi_pinyin
    保存退出,重新启动中州韵输入法,按F4切换输入法
    在五笔拼音输入法下,可直接输入拼音,反查五笔编码

常用软件安装

Docker安装

  1. Docker官方文档
  2. 使用apt仓库安装,国内网络可能非常慢
    # Add Docker's official GPG key:
    sudo apt-get update
    sudo apt-get install ca-certificates curl
    sudo install -m 0755 -d /etc/apt/keyrings
    sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
    sudo chmod a+r /etc/apt/keyrings/docker.asc# Add the repository to Apt sources:
    echo \"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
    sudo apt-get update
    sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
    
  3. 使用离线包安装
    1. 打开网页
    2. 选择Debian的版本
    3. 进入pool/stable/,选择平台
    4. 下载以下deb文件
      containerd.io_<version>_<arch>.deb
      docker-ce_<version>_<arch>.deb
      docker-ce-cli_<version>_<arch>.deb
      docker-buildx-plugin_<version>_<arch>.deb
      docker-compose-plugin_<version>_<arch>.deb
      
    5. 以Debian12(bookworm)为例,下载链接
      1. containerd.io_1.6.28-2
      2. docker-ce_26.0.0-1
      3. docker-ce-cli_26.0.0-1
      4. docker-buildx-plugin_0.13.1-1
      5. docker-compose-plugin_2.25.0-1
    6. 安装离线包
      # 如果没有iptables,需要先安装iptables:apt install -y iptables
      sudo dpkg -i ./containerd.io_1.6.28-2_amd64.deb \./docker-ce_26.0.0-1~debian.12~bookworm_amd64.deb \./docker-ce-cli_26.0.0-1~debian.12~bookworm_amd64.deb \./docker-buildx-plugin_0.13.1-1~debian.12~bookworm_amd64.deb \./docker-compose-plugin_2.25.0-1~debian.12~bookworm_amd64.deb
      
    7. 验证是否安装成功
    docker ps
    

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/803606.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Python操作SQLite数据库

SQLite 是一种轻量级的数据库引擎&#xff0c;广泛用于嵌入式设备和小型应用程序。在Python中&#xff0c;SQLite 是一个流行的选择&#xff0c;因为它易于使用、快速、可靠&#xff0c;并且无需独立的服务器进程。本文将深入探讨如何使用 Python 操作 SQLite 数据库&#xff0…

Excel·VBA考勤打卡记录整理

看到一个帖子《excel吧-考勤一天四次打卡&#xff0c;快速找出缺卡》&#xff0c;每个人每天有4次打卡记录&#xff0c;需要整理出所有缺少的打卡记录 与之前的文章《ExcelVBA考勤打卡记录统计结果》结果形式类似 与之前的文章《ExcelVBA考勤打卡记录数据整理》查找上下班打卡…

Linux、Docker、Brew、Nginx常用命令

Linux、Docker、Brew、Nginx常用命令 Linuxvi编辑器文件操作文件夹操作磁盘操作 DockerBrewNginx参考 Linux vi编辑器 Vi有三种模式。命令模式、输入模式、尾行模式&#xff0c;简单的关系如下&#xff1a; i -- 切换到输入模式&#xff0c;在光标当前位置开始输入文本。&a…

【go从入门到精通】初识struct结构体

作者简介&#xff1a; 高科&#xff0c;先后在 IBM PlatformComputing从事网格计算&#xff0c;淘米网&#xff0c;网易从事游戏服务器开发&#xff0c;拥有丰富的C&#xff0c;go等语言开发经验&#xff0c;mysql&#xff0c;mongo&#xff0c;redis等数据库&#xff0c;设计模…

Flutter中工厂方法的多种实现方法与使用场景分析

在Flutter应用程序的开发中&#xff0c;使用工厂方法是一种常见的设计模式&#xff0c;它可以帮助我们更好地组织和管理代码&#xff0c;提高代码的可读性和可维护性。本文将介绍Flutter中工厂方法的多种实现方法&#xff0c;并分析其在不同场景下的使用情况。 什么是工厂方法…

虚拟网络设备性能优化

在现代网络架构中&#xff0c;虚拟网络设备扮演着越来越重要的角色&#x1f310;&#xff0c;特别是在云计算☁️和容器化技术&#x1f4e6;广泛应用的背景下。虚拟网络设备如虚拟以太网设备&#xff08;veth&#xff09;、虚拟交换机&#xff08;vSwitch&#xff09;、和虚拟路…

【阅读笔记】《同意》

未成年幼女与男恋童癖的故事 作者: [法]瓦内莎斯普林格拉 翻译&#xff1a;李溪月 kindle看的电子书 笔记 传记形式的书。作者记录了14岁时与一个50岁的恋童癖患者进行第一次性行为的经历以及前后的故事。 恋童癖被作者命名为“G”&#xff0c;作者自称“M”&#xff0c;G是…

适用于 Mac 的 10 大数据恢复工具,具有优点、缺点

数据丢失很常见&#xff0c;并且可能由于许多不同的原因而发生。这种情况在我和我们团队的其他成员身上发生过很多次&#xff0c;即使我们格外小心我们的个人存储设备。 幸运的是&#xff0c;数据恢复软件在大多数情况下都可以工作。但是&#xff0c;由于数据丢失场景彼此之间…

arcgis10.x创建镶嵌数据集

在ArcGIS中创建新的镶嵌数据集的步骤如下&#xff1a;打开ArcGIS软件&#xff0c;并在工具箱中选择“Data Management Tools.tbx”→“Raster”→“Mosaic Dataset”→“Create Mosaic Dataset”。在弹出的窗口中&#xff0c;配置镶嵌数据集的地理数据库位置、名称和坐标系…

centos7 安装 rabbitmq3.8.5

1.首先安装 erlang 环境&#xff1a; curl -s https://packagecloud.io/install/repositories/rabbitmq/erlang/script.rpm.sh | sudo bash sudo yum install erlang-21.3.8.14-1.el7.x86_64 yum install socat -y 2.安装 rabbitmq https://github.com/rabbitmq/rabbitmq-s…

STM32学习和实践笔记(7):改变系统时钟的实验

今天完成了这个改变系统时钟的实验。实验是成功的。 #include "stm32f10x.h" #include "led.h"void delay(u32 i) {while(i--); }void RCC_HSE_Config(u32 div,u32 pllm) //自定义系统时间&#xff08;可以修改时钟&#xff09; {RCC_DeInit(); //将外设R…

【CKA模拟题】边车容器Shared-Volume的具体用法

Useful Resources: Persistent Volumes Claim , Pod to Use a PV 题干 For this question, please set this context (In exam, diff cluster name) kubectl config use-context kubernetes-adminkubernetes An existing nginx pod, my-pod-cka and Persistent Volume Claim…

2024年注册安全工程师考试真题及答案1

一、选择题 31.2019年12月10日&#xff0c;某热力公司供热锅炉发生故障。故障抢修过程中&#xff0c;发现锅炉房桥式起重机主钩抱闸故障&#xff0c;存在溜钩现象。由于起重设备厂家人员不能及时到场&#xff0c;工作负责人急于恢复供热&#xff0c;安排检修工甲站在桥式起重机…

macOS制作C/C++ app

C/C制作macOS .app 一、 .app APP其实是一个文件夹结构&#xff0c;只不过mac的界面中让它看起来像一个单独的文件。 在shell终端或者右键查看包结构即可看到APP的目录结构。 通常的app目录结构如下&#xff1a; _CodeSignature, CodeResources 一般为Mac APP Store上架程序…

【aws】在DBeaver上用终端节点连接Redshift

碎碎念 最近想要尝试redshift的一个叫做重新定位的功能&#xff0c;重新定位触发之后会停止当前的集群&#xff0c;转而在同一个区域的另一个可用区中启动一个一样的集群&#xff0c;这个过程视情况会花上10到60分钟不等。 但是目前项目中连接到redshift用的是私有ip&#xf…

保研线性代数复习4

一.范数&#xff08;Norms&#xff09; 1.什么是范数&#xff1f; 范数是一个向量空间V的函数&#xff0c;每一个属于向量空间V的向量x都匹配了一个实数&#xff08;它的长度&#xff09;&#xff1a; 2.范数的性质&#xff1f; 齐次性&#xff1a; 正定性&#xff1a; 三…

大创项目推荐 深度学习 机器视觉 车位识别车道线检测 - python opencv

0 前言 &#x1f525; 优质竞赛项目系列&#xff0c;今天要分享的是 &#x1f6a9; 深度学习 机器视觉 车位识别车道线检测 该项目较为新颖&#xff0c;适合作为竞赛课题方向&#xff0c;学长非常推荐&#xff01; &#x1f947;学长这里给一个题目综合评分(每项满分5分) …

webrtc m98编译问题记录

webrtc m98编译问题 执行命令 gn gen --targetx64 --idevs2019 --args"is_debugtrue rtc_enable_protobuffalse is_clangfalse target_cpu\"x64\" enable_iterator_debuggingtrue use_custom_libcxxfalse symbol_level0 rtc_include_testsfalse" out/d…

【开源书籍】深入讲解内核网络、Kubernetes、ServiceMesh、容器等云原生相关技术。

项目地址&#xff1a;GitHub - isno/theByteBook: ⭐ 【开源书籍】深入讲解内核网络、Kubernetes、ServiceMesh、容器等云原生相关技术。经历实践检验的 DevOps、SRE指南。如发现错误&#xff0c;谢谢提issue 深入架构原理与实践 这是什么&#xff1f; 这是一本关于架构设计…

1. qml的基础入门篇-及学习思路大纲

目录 学习习惯学习大纲&#xff08;会不间断修订&#xff09;&#xff08;留意第一篇&#xff09; 学习习惯 学习qt不得不说的一些基本习惯&#xff1a; ①查看qt源码&#xff0c;学习qt一定要耐心去看qt的源码&#xff0c;有很多技术我们可以从中借鉴 ②查看代码开放平台&…