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

魔百盒 Armbian OS 25.08 (基于 Debian 11 bullseye)换源

一键换源,以及docker国内源,实现脚本

这地方是分成两个文件的替换方法

使用方法

1.复制脚本保存:

nano change_source.sh

粘贴内容,保存退出。

#!/bin/bash
set -eecho "=== 直接替换 Armbian/Debian 阿里源并配置 Docker 国内加速 ==="# ------------------------
# 1. 写入 Debian 阿里源
# ------------------------
cat <<EOF | sudo tee /etc/apt/sources.list.d/debian.sources
Types: deb
URIs: http://mirrors.aliyun.com/debian
Suites: bullseye bullseye-updates
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpgTypes: deb
URIs: http://mirrors.aliyun.com/debian-security
Suites: bullseye-security
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
EOF# ------------------------
# 2. 写入 Armbian 阿里源
# ------------------------
cat <<EOF | sudo tee /etc/apt/sources.list.d/armbian-config.sources
Types: deb
URIs: http://mirrors.aliyun.com/armbian
Suites: bullseye
Components: main bullseye-utils bullseye-desktop
Signed-By: /usr/share/keyrings/armbian.gpg
EOF# ------------------------
# 3. 更新系统(增加重试和超时,避免卡住)
# ------------------------
sudo apt-get -o Acquire::Retries=3 -o Acquire::http::Timeout=10 update --fix-missing
sudo apt-get -y -o Acquire::Retries=3 -o Acquire::http::Timeout=10 upgrade --fix-missing# ------------------------
# 4. 配置 Docker 国内镜像加速
# ------------------------
sudo mkdir -p /etc/docker
cat <<EOF | sudo tee /etc/docker/daemon.json
{"registry-mirrors": ["https://docker.m.daocloud.io","https://dockerproxy.com","https://docker.1panel.live","https://mirror.iscas.ac.cn"]
}
EOFsudo systemctl daemon-reexec || true
sudo systemctl restart docker || trueecho "=== 完成!源已替换为阿里云,系统升级完成,Docker 国内加速已配置 ==="

2.加执行权限:

chmod +x change_source.sh

3.运行

./change_source.sh
http://www.dtcms.com/a/395531.html

相关文章:

  • MacOS安装brew失败,无法访问github,怎么处理
  • 举办2025年iCAN大学生创新创业大赛未来机器人创业大赛
  • MissionPlanner架构梳理之(十八)视频流
  • 2025 前端突围战:当 React Server Components 遇上 AI 编程,我们该如何重构开发范式?
  • xss-labs闯关【1-11】
  • vue2利用canvas翻页浏览pdf文件
  • 仿生视觉芯片迈向实用化:《Advanced Science》报道双极性宽谱光电晶体管,赋能自动驾驶与机器感知
  • 如何在手机上把CAD图纸导出为PDF?
  • 【2025最新】02 Spring Boot 第一个小程序 for VS Code - 通过 Spring Initializr 扩展创建
  • map和set的使用和实现(C++)
  • Qt 系统相关 - 网络
  • Java中List转换成Map的两种方式
  • 嵌入式 - RAM10
  • Qwen新开源tongyi-DeepResearch:核心优势
  • Java Stream API性能优化实践指南
  • Qt配置序列化与反序列化实战:QSettings的深度应用指南
  • MySQL下载时出现“starting the server”或“initializing错误”的原因以及解决方案
  • MySQL 数据库核心知识点详解
  • 让机器人边思考边行动!新一代具身智能EO-1:统一架构突破VLA瓶颈
  • 数据库笔试选择题:题组1
  • 一款相机是只有桶形畸变 和 枕形畸变的一种,还是两个都有?
  • 德克西尔井盖异动传感器:城市安全的隐形守护者
  • HTML基本标签一
  • BGP高防服务器具体是指什么
  • 打工人日报#20250922
  • Django视图与路由
  • 在thinkphp8的模板文件中 如何调用公共服务类函数
  • Nextcloud增加模块内嵌网页
  • Ubuntu18.04 MySQL5.7.42 内存升高导致OOM MySQL重启解决办法
  • html调起exe程序