当前位置: 首页 > 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

相关文章:

  • 老牌开源 SVG 编辑器 SVGEdit 是如何架构的?
  • 优秀的时间追踪软件Timemator for Mac轻松管理时间!
  • vscode-insiders Remote-SSH XHR failed无法访问远程服务器
  • 【C++ 设计模式】面向对象设计原则 Template Method 模式 Strategy 策略模式
  • openssl升级
  • maven 将Jar包安装到本地仓库
  • 红黑树详解
  • python给视频增加字幕
  • 【maven】【IDEA】idea中使用maven编译项目,报错java: 错误: 找不到符号 【2】
  • 求最小的起始正整数
  • java大视频在线预览(支持断点下载)
  • ChatGPT重磅升级!集简云支持GPT4 Turbo Vision, GPT4 Turbo, Dall.E 3,Whisper等最新模型
  • 【深度学习】不用Conda在PP飞桨Al Studio三个步骤安装永久PyTorch环境
  • VL06O报表添加增强字段
  • 【信息安全原理】——DNS安全(学习笔记)
  • [iOS]Core Data浅析一 -- 启用Core Data
  • Angular2开发踩坑系列-生产环境编译
  • JavaScript/HTML5图表开发工具JavaScript Charts v3.19.6发布【附下载】
  • java正则表式的使用
  • JDK 6和JDK 7中的substring()方法
  • node学习系列之简单文件上传
  • PHP那些事儿
  • Python利用正则抓取网页内容保存到本地
  • tensorflow学习笔记3——MNIST应用篇
  • 测试开发系类之接口自动化测试
  • 基于 Babel 的 npm 包最小化设置
  • 老板让我十分钟上手nx-admin
  • 前端性能优化--懒加载和预加载
  • 使用 Docker 部署 Spring Boot项目
  • 我这样减少了26.5M Java内存!
  • 协程
  • 译自由幺半群
  • 栈实现走出迷宫(C++)
  • # Swust 12th acm 邀请赛# [ K ] 三角形判定 [题解]
  • #git 撤消对文件的更改
  • #微信小程序:微信小程序常见的配置传旨
  • #我与Java虚拟机的故事#连载16:打开Java世界大门的钥匙
  • ( 10 )MySQL中的外键
  • (2)STM32单片机上位机
  • (附源码)python房屋租赁管理系统 毕业设计 745613
  • (附源码)springboot美食分享系统 毕业设计 612231
  • (论文阅读40-45)图像描述1
  • (十八)SpringBoot之发送QQ邮件
  • (十三)Java springcloud B2B2C o2o多用户商城 springcloud架构 - SSO单点登录之OAuth2.0 根据token获取用户信息(4)...
  • (原創) 如何安裝Linux版本的Quartus II? (SOC) (Quartus II) (Linux) (RedHat) (VirtualBox)
  • .axf 转化 .bin文件 的方法
  • .bat批处理(七):PC端从手机内复制文件到本地
  • .equals()到底是什么意思?
  • .Net Core和.Net Standard直观理解
  • .net 逐行读取大文本文件_如何使用 Java 灵活读取 Excel 内容 ?
  • .NET8 动态添加定时任务(CRON Expression, Whatever)
  • .NET成年了,然后呢?
  • ??在JSP中,java和JavaScript如何交互?
  • @CacheInvalidate(name = “xxx“, key = “#results.![a+b]“,multi = true)是什么意思
  • @DependsOn:解析 Spring 中的依赖关系之艺术