当前位置: 首页 > 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安全(学习笔记)
  • Android交互
  • LeetCode29.两数相除 JavaScript
  • pdf文件如何在线转换为jpg图片
  • php ci框架整合银盛支付
  • vue-loader 源码解析系列之 selector
  • 百度贴吧爬虫node+vue baidu_tieba_crawler
  • 分享自己折腾多时的一套 vue 组件 --we-vue
  • 浮现式设计
  • 给第三方使用接口的 URL 签名实现
  • 排序算法之--选择排序
  • 入职第二天:使用koa搭建node server是种怎样的体验
  • 深度学习入门:10门免费线上课程推荐
  • 推荐一款sublime text 3 支持JSX和es201x 代码格式化的插件
  • 一个SAP顾问在美国的这些年
  • 在weex里面使用chart图表
  • 【干货分享】dos命令大全
  • Java总结 - String - 这篇请使劲喷我
  • (C语言)fread与fwrite详解
  • (八)五种元启发算法(DBO、LO、SWO、COA、LSO、KOA、GRO)求解无人机路径规划MATLAB
  • (附源码)基于ssm的模具配件账单管理系统 毕业设计 081848
  • (附源码)计算机毕业设计大学生兼职系统
  • (淘宝无限适配)手机端rem布局详解(转载非原创)
  • (一)Thymeleaf用法——Thymeleaf简介
  • (转)视频码率,帧率和分辨率的联系与区别
  • .NET MVC第五章、模型绑定获取表单数据
  • .net 打包工具_pyinstaller打包的exe太大?你需要站在巨人的肩膀上-VC++才是王道
  • .Net 中的反射(动态创建类型实例) - Part.4(转自http://www.tracefact.net/CLR-and-Framework/Reflection-Part4.aspx)...
  • .net6+aspose.words导出word并转pdf
  • .Net调用Java编写的WebServices返回值为Null的解决方法(SoapUI工具测试有返回值)
  • .net最好用的JSON类Newtonsoft.Json获取多级数据SelectToken
  • ??javascript里的变量问题
  • @RequestParam详解
  • [ C++ ] STL_stack(栈)queue(队列)使用及其重要接口模拟实现
  • [ vulhub漏洞复现篇 ] ThinkPHP 5.0.23-Rce
  • [2024最新教程]地表最强AGI:Claude 3注册账号/登录账号/访问方法,小白教程包教包会
  • [ACTF2020 新生赛]Upload 1
  • [Android学习笔记]ScrollView的使用
  • [C语言]——分支和循环(4)
  • [Electron]ipcMain.on和ipcMain.handle的区别
  • [HackMyVM]靶场 Wild