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

debian 12 配置

1. 修改apt源

修改apt源为http版本

# 默认注释了源码镜像以提高 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-firmwaredeb 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

并且安装

apt -y install apt-transport-https ca-certificates

修改为https源

# 默认注释了源码镜像以提高 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-firmwaredeb 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-firmwaredeb 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-firmwaredeb 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

2.修改时区

设置中国时间

timedatectl set-timezone Asia/Shanghai

3.The system will suspend now! 禁止掉debian默认休眠

systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

4.增加中文支持

apt -y install localessudo dpkg-reconfigure locales

5.增加sudo权限

sudo usermod -aG sudo xingpengsystemctl reboot

输入后重启即可

6.去掉关闭盖子的影响

sudo vim /etc/systemd/logind.conf

7.安装docker

for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg# Add the repository to Apt sources:
echo \"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] 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

更换docker到国内源

{"registry-mirrors":["https://mirror.ccs.tencentyun.com","https://registry.docker-cn.com","https://hub-mirror.c.163.com","https://docker.mirrors.ustc.edu.cn"]
}
sudo systemctl daemon-reloadsudo systemctl restart dockersudo docker info

http://www.lryc.cn/news/246997.html

相关文章:

  • AIGC创作系统ChatGPT网站源码、支持最新GPT-4-Turbo模型、GPT-4图片对话能力+搭建部署教程
  • Vue 中简易封装网络请求(Axios),包含请求拦截器和响应拦截器
  • git提交报错error: failed to push some refs to ‘git url‘
  • 【Python】(自定义函数)模块的相对路径导入
  • 巧妙之中见真章:深入解析常用的创建型设计模式
  • Selenium切换窗口、框架和弹出框window、ifame、alert
  • QT linux下应用程序打包
  • Java高级技术(单元测试)
  • leetCode 1080.根到叶路径上的不足节点 + 递归 + 图解
  • C++基础 -10- 类
  • 【软件测试】性能测试相关指标
  • Leetcode 2943. Maximize Area of Square Hole in Grid
  • qt 简单了解QHBoxLayout QVBoxLayout QFormLayout水平,垂直,表单布局管理器.
  • springboot中4级配置文件优先级
  • Python(八十九)函数的参数的内存分析
  • 西南科技大学C++程序设计实验二(类与对象一)
  • 代码随想录二刷 |哈希表 |四数之和
  • KMP算法【数据结构】
  • 测开笔记--Typescript: 文件复制到指定目录
  • 数字滚动vue-count-to
  • 扩散模型实战(十一):剖析Stable Diffusion Pipeline各个组件
  • Mysql面试题总结
  • 学习知识随笔(Django)
  • 基于element自动表格
  • Python基础语法之学习数据转换
  • 最新AI创作系统ChatGPT网站运营源码、支持GPT-4-Turbo模型,图片对话识图理解,支持DALL-E3文生图
  • Kotlin中常见的List使用
  • 汽车电子 -- 车载ADAS之LCA(变道辅助系统)
  • MongoDB——golang操作(链接,CURD,聚合)
  • 音视频项目—基于FFmpeg和SDL的音视频播放器解析(十八)